G
Guest
I have the following code when a calendar is selected and visible to allow
one to choose a date in the ctlChooseFromDate unbound control.
Private Sub calChooseFromDate_Click()
dteFromDate = Me.calChooseFromDate
Me.ctlChooseFromDate = dteFromDate
Me.ctlChooseFromDate.SetFocus
Me.calChooseFromDate.Visible = False
Call Refresh
Exit Sub
End Sub
When the command "Me.ctlChooseFromDate" is executed one gets the run-time
error 2110, "DLB Trucking, Inc. can't move to the control ctlChooseFromDate."
This same code with a different field reference in the setFocus statement
runs correctly in other forms. I have turned off the autocorrect for the
ctlChooseFromDate control on the form.
I have tried setting the focus to other controls on the form, all with the
same resulting error message.
Why can't I set the focus to this or some control on the Form?
one to choose a date in the ctlChooseFromDate unbound control.
Private Sub calChooseFromDate_Click()
dteFromDate = Me.calChooseFromDate
Me.ctlChooseFromDate = dteFromDate
Me.ctlChooseFromDate.SetFocus
Me.calChooseFromDate.Visible = False
Call Refresh
Exit Sub
End Sub
When the command "Me.ctlChooseFromDate" is executed one gets the run-time
error 2110, "DLB Trucking, Inc. can't move to the control ctlChooseFromDate."
This same code with a different field reference in the setFocus statement
runs correctly in other forms. I have turned off the autocorrect for the
ctlChooseFromDate control on the form.
I have tried setting the focus to other controls on the form, all with the
same resulting error message.
Why can't I set the focus to this or some control on the Form?