Weird VBA Reference Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,
I got a new computer at work and am making a few small Access DB's. I'm
having a problem that I can't seem to resolve.

I added a button to a form, all it does is this:
Me.Sched1TO.Visible = True

Then I added another button that does this:
DoCmd.OpenForm "Sched2Vac", , ,

Now both buttons are throwing the same errror:

The expression On Click you entered as the event property setting produced
the following error: A problem occurred while Microsoft Office Access was
communicating with the OLE server or Active X Control.
*The expression may not result in the name of a macro, the name of a
user-defined function
*There may have been an error evaluating the function, eventm or macro,

Please help!!!
Do I have to add another reference into the VB portion of the DB?
am I missing a reference?
I had this problem with a different DB earlier today. So I created a new
one and imported the forms and tables, it worked for a bit, but now throwing
the same error.
 
*The expression may not result in the name of a macro, the name of a
user-defined function
*There may have been an error evaluating the function, eventm or macro,

I suspect you may have tried to type the code directly into the
Property textbox. That textbox should show [Event Procedure], and you
need to click the ... icon and invoke the Code Builder; put the code
you cite between the Sub and End Sub lines.

Possibly some *other* event on the form has something other than
[Event Procedure] or a valid macro name in its property.

John W. Vinson[MVP]
 
Back
Top