Access MVP (2010-2015)


Appointment Collision Check

You’ve created a database for scheduling appointments, one little problem when entering these appointments you can’t tell if it clashes with another appointment (especially, if you are not the only one entering). You could use a query but I always thought this would be handled better in a Module besides, I had an old database […]


Procedure View vs. Full Module View

While developing you may find yourself in the VB Editor adjusting the Function for a Control or the Form itself. When it opens you have to hunt down where the cursor is flashing, even though you have clicked the After_Update event for a specific control. There’s an easier way…

When you click the Build button […]



Recently, I saw a post regarding moving a Query (SQL) to VBA. I remember I saw something somewhere that automated this task but could not remember where. Well, after a little surfing of my favorite sites I found it… Copy SQL statement from query to VBA by Allen Browne. And, because I couldn’t leave well […]


Count characters

Normally, it’s not an issue if an End User tries to type in more characters than the Control will allow… they just can’t type anymore. BUT, if you are using an UNBOUND Form for data entry this is a big problem, they will not be able to Save and with a not so nice message. […]


Check if File is there

If Dir("put full filepath and filename here") = "" Then Msgbox "The file was not created." End If


Check if File exists

Sometimes you need to see if a file is in a directory for one reason or another…

Will delete the file if it exists

If FileExists(C:\Folder\Subfolder\YourDatabaseName.accdb) Then Kill "C:\Folder\Subfolder\YourDatabaseName.accdb" Else Msgbox "Nothing to do!" End if

Will rename the file if it exists

If FileExists("\\YourServerName\Folder\Subfolder\" & Me.cboYear & "-VendorReevaluation.xlsx") = True Then xlWBk.SaveAs "\\YourServerName\Folder\Subfolder\" & […]