As projects grow and grow, I am ever less patient to be able to test "something" without fully developing.
Using the VBA Immediate window (VBA Editor, Ctrl-G) I found if the right needed objects are in memory, I am able to test a new class WITHOUT needing to build the form which the class is to work with!
Steps I performed:
1) Write the VBA class
2) Provide the supporting code which creates an instance of the class. I create all of my DB class objects in separate Modules per chunk of the application. So this time I went to module "modbuyer_bootstrap" and added this LOC:
3) Then I got far enough into the application that I knew all of the other DB objects ObjBuyerOMTbl would need were created and populated with valid data.
4) Lastly, moment of truth, I triggered a method of the class object via the Immediate window:
pressed Enter and then saw:
as that class method returns a Logical. Checking the FE Temp Table indeed I see the correct records!
Now I have already tested the DB class object which will populate the form with data. I may shift from VBA class thinking to form thinking. Perhaps "Access/VBA gone Agile?" WFM. YMMV. EIEIO.
Using the VBA Immediate window (VBA Editor, Ctrl-G) I found if the right needed objects are in memory, I am able to test a new class WITHOUT needing to build the form which the class is to work with!
Steps I performed:
1) Write the VBA class
2) Provide the supporting code which creates an instance of the class. I create all of my DB class objects in separate Modules per chunk of the application. So this time I went to module "modbuyer_bootstrap" and added this LOC:
Code:
Public ObjBuyerOMTbl As New clsObjBuyerOMTbl
4) Lastly, moment of truth, I triggered a method of the class object via the Immediate window:
Code:
? ObjBuyerOMTbl.RefreshLocalTmpTbl
Code:
? ObjBuyerOMTbl.RefreshLocalTmpTbl
True
Now I have already tested the DB class object which will populate the form with data. I may shift from VBA class thinking to form thinking. Perhaps "Access/VBA gone Agile?" WFM. YMMV. EIEIO.