by Jonathan Halder | Jul 30, 2024 | MS Access, MS Access Features, MS Access Forms, MS Access VBA Coding
Yesterday, I was talking about the BeforeUpdate form event and BeforeUpdate Access control event as ways I was looking at triggering a validation function and then canceling the event so the update would not occur. A reader wrote in to mention usage of the Change...
by Jonathan Halder | Jul 29, 2024 | MS Access, MS Access Forms, MS Access VBA Coding
It’s easy to get burned when trying to set up custom validations for Access fields and enforcing them while the form is being filled out. I have a form with the following fields (of the type): Vendor Name (string) Is Vendor Active (checkbox) Is On PO form...
by Jonathan Halder | Jul 26, 2024 | MS Access, MS Access VBA Coding
Sometimes you can get runtime errors when you are trying to assign the value of a control to some VBA object. For example, consider this statement: TempVars!NewTempVar = Form_orders.order_id What we are trying to do is set the NewTempVar in the TempVars system...
by Jonathan Halder | Jul 23, 2024 | Blogging, MS Access, MS Access Features, MS Access Forms, MS Access VBA Coding
If you are using DoEvents in your VBA code to allow form updates or preventing Windows from labeling your Access app as Unresponsive, make sure you consider the potential ramifications. DoEvents not only chimes in to the OS that it’s awake, but it also allows...
by Jonathan Halder | Jul 18, 2024 | MS Access, MS Access VBA Coding
I recently needed to calculate the period number of a current date for a client. The current period is not exactly the current week number, it’s a specific week, but it could start on any particular day and end on any particular day. In my case, they specify it...
by Jonathan Halder | Jul 16, 2024 | MS Access, MS Access Features, MS Access VBA Coding
I had never heard of this keyword. I was perusing the Microsoft Learn web site and happened across this in the VBA reference here: Deftype statements (VBA) | Microsoft Learn Here is the basic definition from that page: Used at the module level to set the default data...