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,
 
L

Linq Adams via AccessMonster.com

I have no idea of the code you're using, but most schemes to speed up the
loading of Access involve the form having no RecordSource initially and
setting it after the form opens. If this is what you're doing, there's no
need to set the RecordSource to nothing on unloading the form; a dynamically
assigned RecordSource will be lost when the form closes without any code.
 
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