Strange Form error ?

  • Thread starter Thread starter TonyB
  • Start date Start date
T

TonyB

Hi,
I have created a form based upon a table, and if I enter a new record and
try to exit the form I get the message
" Microsoft Access can't find the macro '.' "
This only happens if I create a new record. I've looked through the design
view of the form and can't find out where
this macro is ? I have a form afterupdate event calling a vba sub, but I
dont knowingly have any macros defined at all yet.
Any ideas what might be causing this or how to find it ?
Regards
Tony
 
It could be on several other events on the form (ie OnUnload, OnClose. . .)
or the control / form that gets focus once the form has closed (on Activate,
OnGotFocus. ... ).

With the form in design, click on properties, select the Events tab and look
for a non-empty row
 
Hi John,
I have tried that several times. I copied the form and I've deleted all
controls except one, and I still get this message on the copy.
Is there anyway to list the macros used by an object such as a form so I can
find it ?
Regards
Tony
 
TonyB said:
Hi,
I have created a form based upon a table, and if I enter a new record
and try to exit the form I get the message
" Microsoft Access can't find the macro '.' "
This only happens if I create a new record. I've looked through the
design view of the form and can't find out where
this macro is ? I have a form afterupdate event calling a vba sub,
but I dont knowingly have any macros defined at all yet.
Any ideas what might be causing this or how to find it ?
Regards
Tony

I've seen this happen when one of the event properties has a blank space
or a carriage return in it, instead of just an empty value. It's not
obvious to the eye when this has happened, because nothing shows up on
the property line.

If it only happens when you create a new record, then the form's
BeforeInsert and AfterInsert properties seem the most likely candidates.
I suggest that you open the form in design view, bring up the property
sheet for the form, go to the Events tab, click on the property line for
each of thse events, and hit the delete key multiple times to make sure
the property is really empty. If you continue to get the error message
after you've done that, try doing the same with other properties -- only
the ones that ought to be empty, of course.

If that doesn't resolve the problem, you may have a corrupt form. But
let's try this first.
 
Back
Top