Data Entry Mode And Form OnCurrent Event Question

  • Thread starter CrazyAccessProgrammer
  • Start date
C

CrazyAccessProgrammer

Does setting a form's DataEntry property to TRUE in VBA trigger the form's
OnCurrent event?

On my form i put the following code in my form's OnCurrent Event:
Me.Form.DataEntry=True

The result is an endless loop, I have to ctrl-break to get back to design
mode. Is this normal? I ask because in Access Help it doesn't mention this if
what I'm experiencing is normal.
 
D

Douglas J. Steele

What are you hoping to accomplish by setting the DataEntry property? The
Data Entry property doesn't determine whether records can be added; it only
determines whether existing records are displayed, so it does make sense
that setting it would retrigger the OnCurrent event. I believe the Current
row would be changed to the NewRow (whether or not that was already current)
 
C

CrazyAccessProgrammer

Well after having spent a few days struggling with a problem on my form as it
related to the DataEntry mode property being set to true in the OnCurrent
event... I finally found a solution for myself and posting it here for anyone
else who has strangeness with their form when they set DataEntry mode to True
during a form's OnCurrent Event.

The solution is DON'T set the DataEntry mode to TRUE during a Form's
OnCurrent event. Set it either in the form's OnOpen or OnLoad event instead.
And all will be right with the universe.
 

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