If you want to get HTML editor within MS Access form, there are couple of solutions available. The free solution I know is to get Not So Elegant HTML Editor. The problem with this editor is that After looking at this editor, you will never say “so cool” It is good for basic editing but… Read More »
Here is a code to change MS Access application title and icon using VBA. This code also sets the application icon as form and report default icon. Dim db As Database Set db = CurrentDb db.Properties("AppIcon").Value = CurrentProject.Path & "\Bee.ico" db.Properties("AppTitle").Value = msgMainTitle db.Properties("UseAppIconForFrmRpt").Value = True Application.RefreshTitleBar Click here for list of all properties exposed… Read More »
CurrentDB.Properties is nothing but a collection. If you can iterate through a collection, you will be able to get the list of all the properties. Code to iterate through all properties is Dim i As Integer For i = 0 To CurrentDb.Properties.count – 1 Debug.Print CurrentDb.Properties(i).Name Next It gave me following list of properties. Name… Read More »
Description: I was executing a stored proc which would halt its execution using RAISERROR. When I tried to run the stored proc in Query Analyzer it worked fine and gave me error but in VBA it couldn’t halt the execution and continued to the next statement.
When I tried to run an UPDATE statement from pass-through query, it throwed error “Cannot execute a select query”. This is due to that fact the property ReturnsRecords is set to True which requires the pass through query to return results. If it does not return recordset, it will throw an error. You can correct… Read More »
If you need to check if MS Access form is loaded or not, you can easily check it using the folloing code If CurrentProject.AllForms("FORMNAME").IsLoaded = True Then ' DO SOMETHING End If This code is good until you are using single form application. This code will fail if the form is used as subform. To… Read More »
set me.List0.Recordset = rs.clone rs.close by this way the new recordset will be assigned to the list and the original will be closed.
I had an application in which I had a code like Dim qdf as QueryDef qdf = new QueryDef("Query")qdf.execute The query was not running because of error but the application was not breaking at the time of error generation. To force the application to break/throw exception write the statement like qdf.execute dbfailOnError and by this… Read More »
When the Access database grows much large and the performance of the application gets worsen, you might need to think of upsizing the Access database into SQL Server database. So that you can split your MS Access front end and SQL Server back end. Microsoft Access comes with a utility called “Upsizing Wizard”. It is… Read More »