by Jonathan Halder | Apr 30, 2024 | MS Access, MS Access Forms, MS Access VBA Coding, TDD
I had a pretty “simple” change to an application in a IsLineValid function that checks the active record on a subform to see if that line is valid. A new requirement in the application meant that the conditions changed slightly. Originally, I just added...
by Jonathan Halder | Apr 29, 2024 | MS Access, MS Access Forms, MS Access VBA Coding, TDD
After reviewing the code further I have planned out how to break the form dependency in my code that I wish to test. The code I wish to test IsLineValid currently depends on a function inside the same class called thisForm which returns a specific type of Access form...
by Jonathan Halder | Apr 26, 2024 | MS Access, MS Access Forms, MS Access VBA Coding, TDD
I have a class called PoLineController which has a public IsLineValid method. I made a change to this method in my previous TDD article, but I didn’t test it first. I did end up refactoring it a bit. So looking back, I am going to think about how I could have...
by Jonathan Halder | Apr 24, 2024 | MS Access, MS Access Forms, MS Access VBA Coding, TDD
I want to start doing TDD when doing anything new on a client project, or even when debugging. I’m trying to use principles from “Working Effectively With Legacy Code” by Michael C Feathers, although I haven’t finished reading the book yet. For...
by Jonathan Halder | Apr 19, 2024 | MS Access, MS Access Forms, MS Access VBA Coding
Tracking deletions to a continuous subform can be tricky. The Delete Confirmation event does NOT fire for subforms. Only the OnDelete Event. This allows you to Cancel the event, but does not allow you to leave the subform to run any code affecting the parent form and...
by Jonathan Halder | Apr 15, 2024 | MS Access, MS Access Forms, MS Access Queries, MS Access VBA Coding
Occasionally, I run into an issue where I am using some function within a BeforeUpdate event in an Access form which goes and updates the table with a SQL statement or query. This can produce some unwanted and messages about someone else editing the record and do you...