by Jonathan Halder | Mar 24, 2025 | Blogging, MS Access, MS Access Forms, MS Access Queries, MS Access VBA Coding
Today, for my customer’s app, I wrote some VBA code in an after update routine of a textbox to strip out non-numeric characters and reformat them into a phone number format the customer wanted. Private Sub employee_phone_number_AfterUpdate() If...
by Jonathan Halder | Mar 14, 2025 | Blogging, MS Access, MS Access Forms, MS Access VBA Coding, TDD
I thought I would update folks on my TDD progress using VBA in Access. I use the RubberDuckVBA Unit Testing component to create and run tests. You don’t need a fancy program or system like that to utilize automated testing, but I have enjoyed using it and the...
by Jonathan Halder | Feb 26, 2025 | Blogging, MS Access, MS Access Forms, MS Access VBA Coding, TDD
This is a very basic set of 2 classes to produce a CustomTags object that can take an Access Control object from a form and store an internal dictionary intended to use string keys to store string values for that tag. The ControlTags and ControlTag currently use early...
by Jonathan Halder | Feb 25, 2025 | Blogging, MS Access, MS Access Forms, MS Access VBA Coding, TDD
Ok, so to use test driven development here, I will start writing tests to describe the behaviors of the control I want and then code to make the tests pass. I copied the code from the module from last time with the TestCustomTags Sub to a new Test module I created...
by Jonathan Halder | Feb 21, 2025 | Blogging, MS Access, MS Access Forms, MS Access VBA Coding
So I’m doing some proof of concept here. I want to use a starting syntax like the following in the Debug.Print line: Public Sub TestCustomTags() Dim testCT As CustomTags Set testCT = New CustomTags Dim ctl As Access.Control Set ctl = Form_TestForm.TestControl...
by Jonathan Halder | Feb 20, 2025 | Blogging, MS Access, MS Access Forms, MS Access VBA Coding
So far my idea just kind of sucks. It’s ok, sometimes one just has a sucky idea. I think what I’d really like to be able to do is something like this: ‘ In a form object, wouldn’t it be nice to be able to do this? Private Sub Form_Load()...