Help - Cannot SetFocus

  • Thread starter Thread starter Steve M
  • Start date Start date
S

Steve M

Hi

I am trying to SetFocus on a field call 'Reference' when the user clicks Add
New Record.

I have tried
Private Sub Form_Current()
If Me.Newrecord Then Me.Reference.SetFocus
End Sub

But after I put Reference. Set Focus does not appear just Value.
I get the error message Compile error:
Method or data member not found


This has worked fine on a different database
Totally confussed
Any ideas before this novice goes insane - thanks

Steve
 
Steve, it sounds like you have a field named Reference, but the text box has
a different name.

Right-click the control where you enter this value, and choose Properties.
What is its Name property (Other tab of properties box)?

You can SetFocus to a control only, not to a field.

If that is not the case, post a reply to this thread for further
suggestions. It is possible that Name AutoCorrect has confused Access about
what this field is called. More info:
http://allenbrowne.com/bug-03.html
 
Back
Top