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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top