by Jonathan Halder | Feb 5, 2025 | Blogging, MS Access, MS Access VBA Coding
I found myself in a position where I needed to be able to take an arbitrary string and remove consecutive spaces in a string, replacing them with one space each. Example:”7122A05 N62A N656″to: “7122A05 N62A N656″ This is a pretty simple problem...
by Jonathan Halder | Feb 3, 2025 | Blogging, MS Access, MS Access VBA Coding
This is a very simple pattern. It simply is an object that does a command. It is defined by an Interface with a run() method like this: ‘Class Module Command ‘ To be used to Implement as an interface Option Explicit Public Sub run() End Sub An interface...
by Jonathan Halder | Jan 31, 2025 | MS Access, MS Access Queries, MS Access VBA Coding
Enjoy! ‘Creating a Passthrough query read only recordset on the fly in VBA ‘Put this in a normal module, call it from any other module ‘This is requiring DAO.Database and DAO.QueryDef objects so that ‘ the recordset will survive after the...
by Jonathan Halder | Jan 30, 2025 | Blogging, MS Access, MS Access VBA Coding
So this is my latest nested error test code. You can put it in any public code module and run MainProcedure to see what it will do. The thing to do here is to see how Access will behave in various scenarios and the code paths that execute and the ones that...
by Jonathan Halder | Jan 29, 2025 | Blogging, MS Access, MS Access Features, MS Access VBA Coding
So the reason I was getting strange behavior in some tests I was running was because there was a third party class which responsibly used an error handling scheme used in it’s tests which required an error being raised with Err.Raise to pass up to the calling...