Newbie question: Specifying the field

P

Pic

On a simple form, how do I specify which field the cursor is in when I
move to a new record? Right now, the cursor is in whichever the last
field I clicked in in the previous record. Small inconvenience, but
those seconds add up.

Access 2003.

Thanks in advance,
Pic
 
B

BruceM

The cursor is in a control, not a field. It will help in the future to keep
these two separate in your mind (and in questions).

In the form's Current event you could have this code:
Me.ControlName.SetFocus
where ControlName is the name of the control (text box, etc.) that should
have the focus (i.e. have the cursor in it).

To add the code, open the form in design view. If the Property Sheet (it
has tabs for Format, Data, etc.) is not visible, Click View >> Properties.
Click the Event tab, and click next to Current. Click the three dots that
appear on the right side. Click Code Builder, then OK. The VBA editor will
open, and you should see the cursor blinking between the lines:
Private Sub Form_Current()

End Sub

Add the code there.

If the Property Sheet is already open, click the square at the very top left
of the form window, where the horizontal and vertical rulers would meet.
That will make it so you can see the Form's Property Sheet. To see the
Property Sheet for a text box, etc., and the Property Sheet is already open,
click the text box. Remember, DEsign View to make changes.
 

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