set focus problem

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

Steve M

HI I have the follwing code on Current event

If Me!.Newrecord Then Me!Reference.SetFocus

This has worked fine on the form until I added some tabs to make the form
look better and become more user friendly. Now I get a run time error 438 -
Object does not support this property or method.

i would like the focus to be on the field reference.

Any ideas why I am getting this error.

Cheers Steve
 
Hi,
Not sure, but do you get the same error if you use the dot syntax:
If Me.NewRecord Then Me.Reference.SetFocus
 
Not Me!.NewRecord

Try

Me.NewRecord without the exclamation mark.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top