Iinvalid outside procedure - is my db corrupted

G

Guest

I've created a before update event for a particular form ... the only problem
is, before it even runs I get a strange error message (no error code) that
says the "Expression Before Update as the event property setting has produced
an invalid outside procedure." It doesn't fire the event procedure ...
doesn't open VBA and start evaluating the procedure at my stop line. This
message occurs on the access form itself.

Does anyone know what's causing this? Strange things in general seem to be
happening to my database itself (yesterday the AutoNumber function for one of
my tables which had been at 2500-something, started over at 1 and started
giving new records existing autonumbers). Is there a way to troubeshoot this?

Just in case, here's the first few lines of the Before Update event procedure.

Private Sub Form_BeforeUpdate(Cancel As Integer)
'Before saving, validate whether or not name is already in database

Dim varGetEntity As Variant
Dim varGetEntityType As Variant
Dim intMyReply As Integer
 
G

Guest

I figured it out ... I had a static variable declared in the general section
.... which isn't allowed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top