Mark Plumpton Problem

J

JimRAccess

I have an access 2003 database with windows XP. I have tried to implement
Mark Plumptons speed up access forms procedure. It works good on start up,
but when I get to the line me.recordsource = "" on the unload procedure, it
then immediately goes to the form current procedure and runs into problems,
as there is no longer a recordsource for the form and all sorts of errors
show up.

Does anyone know how do I prevent the code moving from the unload event? I
hope I am not the first one to encounter this.

Thanks,
 
S

Stuart McCall

JimRAccess said:
I have an access 2003 database with windows XP. I have tried to implement
Mark Plumptons speed up access forms procedure. It works good on start
up,
but when I get to the line me.recordsource = "" on the unload procedure,
it
then immediately goes to the form current procedure and runs into
problems,
as there is no longer a recordsource for the form and all sorts of errors
show up.

Does anyone know how do I prevent the code moving from the unload event?
I
hope I am not the first one to encounter this.

Thanks,

Setting the RecordSource causes an automatic requery, so that's why it's
hitting the current procedure. Try wrapping the code you have in OnCurrent,
like:

If Len(Me.RecordSource) > 0 Then

'your existing code

End If
 

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