J
jAdams
Hi,
Please Help
I am working with an Access database that was developed using Office 97 and
was converted to the 2002-2003 Access file format. On this one form there
are 26 text boxes (representing yearly pay periods) and on the “On Lost
Focus†event for each text box the person who developed it set it to run a
macro (that person is since long gone so I'm stuck with this now). The macro
simply calls a function to validate the data that was just entered in the
text box.
When the On Lost Focus event triggers I get this error msg:
“You’ve tried to run a Visual Basic Procedure to set a property or method
for an object. However, the component doesn’t make the property or method
available for Automation operations.
Check the component’s documentation for information on the properties and
methods it makes available for Automation operations.â€
From what I can tell the process errors out before it even makes it to the
function i.e. there is nothing wrong with the code in the function. I tested
this by placing a break at the beginning of the function and the process
never reaches that point before the error occurs.
Also when testing I changed the macro call to an Event Procedure and just
called the function from the event with VBA. This seemed to work but I
believe it’s silly to have to add an event procedure for each text box (26 of
them) to call this function and I can’t help thinking there has got to be a
simple solution, something I’m obviously missing.
The only thing I can figure is that perhaps I need to add or change a
Reference (under Tools – References) but if I am correct I can not figure out
what Reference I need to change/add.
If anyone knows what the problem with this is and/or can point me in the
right direction it would be greatly appreciated.
Thanking you in advance
J. Adams
Please Help
I am working with an Access database that was developed using Office 97 and
was converted to the 2002-2003 Access file format. On this one form there
are 26 text boxes (representing yearly pay periods) and on the “On Lost
Focus†event for each text box the person who developed it set it to run a
macro (that person is since long gone so I'm stuck with this now). The macro
simply calls a function to validate the data that was just entered in the
text box.
When the On Lost Focus event triggers I get this error msg:
“You’ve tried to run a Visual Basic Procedure to set a property or method
for an object. However, the component doesn’t make the property or method
available for Automation operations.
Check the component’s documentation for information on the properties and
methods it makes available for Automation operations.â€
From what I can tell the process errors out before it even makes it to the
function i.e. there is nothing wrong with the code in the function. I tested
this by placing a break at the beginning of the function and the process
never reaches that point before the error occurs.
Also when testing I changed the macro call to an Event Procedure and just
called the function from the event with VBA. This seemed to work but I
believe it’s silly to have to add an event procedure for each text box (26 of
them) to call this function and I can’t help thinking there has got to be a
simple solution, something I’m obviously missing.
The only thing I can figure is that perhaps I need to add or change a
Reference (under Tools – References) but if I am correct I can not figure out
what Reference I need to change/add.
If anyone knows what the problem with this is and/or can point me in the
right direction it would be greatly appreciated.
Thanking you in advance
J. Adams