G
Guest
Hi All,
I am attempting to obtain the Text value of a combobox control in the
footer of an Access form.
As Access does not allow you to obtain these values without first
having "focus", my code looks like this:
Private Sub btnSetValue_Click()
Dim s As String
cboQuarter.SetFocus
s = cboQuarter.Text
MsgBox s
End Sub
The problem is that error "2185 - You can't reference a property or
method for a control unless the control has focus" occurs every time on
the line: "s = cboQuarter.Text"
I am doing this exact same thing in a differant form with no problem.
Any ideas?
Thanks
David
I am attempting to obtain the Text value of a combobox control in the
footer of an Access form.
As Access does not allow you to obtain these values without first
having "focus", my code looks like this:
Private Sub btnSetValue_Click()
Dim s As String
cboQuarter.SetFocus
s = cboQuarter.Text
MsgBox s
End Sub
The problem is that error "2185 - You can't reference a property or
method for a control unless the control has focus" occurs every time on
the line: "s = cboQuarter.Text"
I am doing this exact same thing in a differant form with no problem.
Any ideas?
Thanks
David