Cursor movement

  • Thread starter Thread starter Kwesi Thomas
  • Start date Start date
K

Kwesi Thomas

I'm trying to tell the cursor to go to a certain field
(ready for data entry) when the form is opened or a new
record is started.

How do i acomplish this?

Thanks
 
I'm trying to tell the cursor to go to a certain field
(ready for data entry) when the form is opened or a new
record is started.

How do i acomplish this?

Thanks

Using the On Load event to move the cursor (focus) to the control desired and using the Current event to check if the form is
on the new record and move the focus to that control in that case.

Private Form_Load()
Me.[MyControlName].SetFocus
End Sub

Private Form_Current()
If Me.NewRecord Then Me.[MyControlName].SetFocus
End Sub

Replacing [MyControlName] with the name of the control you desire to have the focus.

Jeremiah Ellison
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top