Select starting field on append

C

cdlcruz

When I finish the last field in my form and click the append control, it
takes me to a new record, but I would like the cursor to be in the first
field on the form, not the one I ended on. Am I missing something obvious?
If I have to add code, where do I put it?
Thanks
 
M

missinglinq via AccessMonster.com

What's the code behind your "append" button?
When I finish the last field in my form and click the append control, it
takes me to a new record, but I would like the cursor to be in the first
field on the form, not the one I ended on. Am I missing something obvious?
If I have to add code, where do I put it?
Thanks
 
C

cdlcruz

missinglinq via AccessMonster.com said:
What's the code behind your "append" button?

I use the |* control at the bottom of the form to take me to a new record.
I haven't used Access much so don't write much code, though I do know some
VBA.
 
P

Pete

I suspect you did what I do all the time. You added a field at the end and
didn't update the tab order. Select view tab order and set them in order
the way you want. Pete
 
C

cdlcruz

No, I have a tab order correctly set, but the problem may be that the last
few fields are left blank until after the ride, when scores are entered.
Should the scores perhaps be a subform?

cdlcruz
 
A

Albert D. Kallal

If you want the cursor to "cycle" through the current record, and NOT move
tot the next record, you can find this setting in the forms "other" tab.

Simply set the "cycle" property to current record....
 
J

John W. Vinson

I use the |* control at the bottom of the form to take me to a new record.
I haven't used Access much so don't write much code, though I do know some
VBA.

You could use code in the form's Current event:

Private Sub Form_Current()
If Me.NewRecord Then
Me!somecontrolname.SetFocus
End If
End Sub

If you navigate to the new record (using the *> tool for example, or tabbing
through all the fields) this will jump to the selected control; if you're just
browsing through existing records it will leave the focus unchanged.

John W. Vinson [MVP]
 
M

missinglinq via AccessMonster.com

I apologize, I misread your original post! From the other answers, I wasn't
the only one, although your post really was perfectly clear! In code simply
put:

Private Sub Form_Current()
NameOfYourFirstField.SetFocus
End Sub

where NameOfYourFirstField is the actual name of your first field.

BTW, that's not normally called the "append" button, but rather the "new
record" button.
 
Top