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

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.
 
G

Graham Mandeno

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
 
M

Michel Walsh

Hi,


Screen.ActiveControl.Value = Variable1


Hoping it may help,
Vanderghast, Access MVP
 
Top