Data Entry Mode And Form OnCurrent Event Question

  • Thread starter Thread starter CrazyAccessProgrammer
  • Start date 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.
 
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)
 
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.
 
Back
Top