Go To Next Record (Macro)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have designed a Form that when you enter an amount into a field and press
enter a macro is executed to take you to the next record (On Exit Event
Procedure). There is also an Exit button on the form. The existence of the
Event Procedure prevents access to the Exit button.
Is there any way around this? Thanks for any help
 
I may be unclear on what you mean to do, but if you want to prevent going to
the next record automatically upon exiting the control you shouldn't put the
event in place. You could use the form's Before Update event or something
to prevent going to the next record, but if you do that what is the point of
the Exit event? However, if you don't enter the control you should still be
able to use the Exit button, since the control's Exit event won't fire. You
could use the control's After Update event so that you don't go to the next
record until the text box contents have changed. That is, if you just click
into the control then click in another control, the control's Control Source
hasn't been updated, so the After Update event won't run. What exactly are
you trying to do?
 
Sorry Bruce for any confusion. When the user enters the form, there is only
one field accessable, where an amount can be typed in or left as is and when
Enter is pressed the user moves to the next record (On Exit Event Procedure)
and the cursor stays in the same field for entering. There is a control that
can be clicked to exit the Form at any stage, but using the "On Exit Event
Procedure" locks this button out. Is there a way around this. Hope I have
been clearer and Many thanks.
 
Roger,

If I understand you correctly, you should use the After Update event of
the textbox, rather than the Exit event. So that means when you get to
a new record, but don't enter any data in there, your command button to
close the form will be accessible because the textbox's After Update
won't be triggered.
 

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

Back
Top