Focus on textbox

hendrikbez

Registered User.
Local time
Today, 02:47
Joined
Oct 30, 2014
Messages
28
have a form, that I am using pop date chooser, it is working, but I am trying to put focus on the textbox, so that when I click the dte, it should show up when I press the use date button

When I am trying to compile I am getting this error.

"Method or data member not found" on this line
.focus is mark in blue.

I do not know why and how to fixed this
Code:
 Me.DateOut.focus
Here is all the code for this button

Code:
Private Sub Date1_Click()
Me.DateOut.focus 
DoCmd.OpenForm "CalendarPopUp" 
Forms!CalendarPopUp!vFormName = "Main" Forms!CalendarPopUp!vFieldName = "DateOut" 
End Sub
 
It Should be .SetFocus

But I think you'll find the form you open will get focus once it's opened...
 
I did change it to

[FONT=&quot]
Code:
Me.DateOut.SetFocus
But still get the same error
[/FONT]
 
Where is the control DateOut - Which form is it on ?
And is that the control name or the field name?
 

Users who are viewing this thread

Back
Top Bottom