- Local time
- Today, 11:52
- Joined
- Feb 28, 2001
- Messages
- 30,154
I am playing around with converting some old code of mine to be a class object so that I can learn a little more about class object manipulation. The object code (and in fact everything in the DB set up for testing) compiles without error, but I get the dreaded "Error 91 - Object variable or With block variable not set." when I try to use it.
The class module IS declared as such. It shows up in my navigation panel as a class module, not an ordinary or forms module. (See included image)
In the form I'm using to test this, in the form's general declaration area I have:
The form is unbound so there wouldn't be a Form_Current event. Therefore, in the Form_Load routine, I attempt to create the new class object. That is when I get the error on the "Set" line. I can single-step past the offending line and the debugger enters the ParserObj "Initialize" event routine but when it comes back it hasn't been initiated because I keep getting that error.
So... what's up with this? What do I look for? This in on Win10 64-bit and Access 2010 32-bit. Resources are NOT a problem.
The class module IS declared as such. It shows up in my navigation panel as a class module, not an ordinary or forms module. (See included image)
In the form I'm using to test this, in the form's general declaration area I have:
Code:
Dim Prs As ParserObj 'the object of testing
The form is unbound so there wouldn't be a Form_Current event. Therefore, in the Form_Load routine, I attempt to create the new class object. That is when I get the error on the "Set" line. I can single-step past the offending line and the debugger enters the ParserObj "Initialize" event routine but when it comes back it hasn't been initiated because I keep getting that error.
Code:
Set Prs = New ParserObj 'create the parser object
So... what's up with this? What do I look for? This in on Win10 64-bit and Access 2010 32-bit. Resources are NOT a problem.