Return to top

S

Slp

I have a database that has about 15 fields in it. for the
most part I only use the first 8 then I click on next
record to continue adding records but the cursor stays on
field 8 is there anyway to make the cursor go to the first
field for every new record?

Thanks
Lynn
 
B

Bruce M. Thompson

I have a database that has about 15 fields in it. for the
most part I only use the first 8 then I click on next
record to continue adding records but the cursor stays on
field 8 is there anyway to make the cursor go to the first
field for every new record?

In the form's "On Current" event procedure, you can use code something like
this:

'***
'If you want to move to the first field on every record change
Me.ControlName.SetFocus

'If you only want to move to the first field on a record change
' when you have moved to a "new" record
If Me.NewRecord Then
Me.ControlName.SetFocus
End If
'***

You would need to replace "ControlName" with the name of the control that
represents the "first" field on your form.
 

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