Set the field which has the focus to a variable value???

  • Thread starter Thread starter Jason Gyetko
  • Start date Start date
J

Jason Gyetko

How do I specify to set the field on my form that currently has the focus
equal to the value of Variable1? Thanks.
 
Hi Jason

Me(Variable1).SetFocus

If you have a number of controls - say, txt1, txt2, txt3, etc - and
Variable1 is an integer, you can say:

Me("txt" & Variable1).SetFocus
 
Hi,


Screen.ActiveControl.Value = Variable1


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top