Mark Plumpton Problem

  • Thread starter Thread starter JimRAccess
  • Start date Start date
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,
 
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
 
Back
Top