SetFocus to txtSomething

nat22

Registered User.
Local time
Today, 19:57
Joined
Jan 16, 2006
Messages
16
Hello,

I have litle problem regarding SetFocus.I have 2 Forms - form1 and form 2.On form 1 I have txtSomething and when I open form2 I can not SetFocus on txtSomething.I have tried with

Forms!Form1!txtSomething.SetFocus

but something wrong,can someone help,

thanks
 
Are you using the OnOpen event of form2 to set the focus to a field in form1?
 
Hello, I did not write anything, so, I have to write event like

Private Sub Form2_OnOpen()
Forms!Form1!txtSomething.SetFocus
End Sub

is this OK?
Thanks
 
Hello everyone,I have solved the problem.
On Form2 I have opened txtSomething2 and with expression builder I made:

=[Forms]![frmForm1]![txtSomething2]

it works!
 

Users who are viewing this thread

Back
Top Bottom