Solola
Board Regular
- Joined
- Sep 23, 2003
- Messages
- 73
I'm trying to make the default cursor location the first field of a new form. I have the form's property Data Entry set to Yes, but that didn't do it.
So, I tried the following code on the On Load property of the form, but when I try to load a new record, I get a Compile error: Method or data member not found (and it highlights SetFocus as the error):
Private Sub Form_Load()
Me.nmdp_rid.SetFocus
End Sub
I also tried an if statement to determine if it's a new record before setting the focus, but that doesn't work, either (same error message).
What am I doing wrong?
So, I tried the following code on the On Load property of the form, but when I try to load a new record, I get a Compile error: Method or data member not found (and it highlights SetFocus as the error):
Private Sub Form_Load()
Me.nmdp_rid.SetFocus
End Sub
I also tried an if statement to determine if it's a new record before setting the focus, but that doesn't work, either (same error message).
What am I doing wrong?