Gerald,
You're not very clear, so I'm just guessing here... are you trying to assign
a value to a control on the form? If yes, are you using an expression like:
Me.ControlName.Value = something
Me.ControlName = something
i.e. take out the Value property reference (it's the one that requires that
the control has the focus). Referring to a control without specifying a
property references its value by default.
If this is not the case, please post back (in the same thread) giving more
details.
HTH,
Nikos
If that's the case, then just change the expression to:
GDL said:
How can I initialize a variable in a form_load subroutine when the form is
opned up. I've got the following error when I do that: "You can't reference
a property or method for a control unless the control has the focus". I am
using a combobox to link one of the table fields and attached to a calendar
to show the dates.