D
Dirk Goldgar
In
Au contraire. If the control were named "txtDate", but the field named
"Date" were still in the form's recordsource -- whether the control were
bound to that field or not -- the problem would still have occurred.
You'd still need to refer to VBA.Date to keep Access from understanding
"Date" as the field. Without any qualification of the name, Access will
find the field and control objects before the VBA function. So reserved
words shouldn't be used for control *or* field names.
Klatuu said:For example, had the OP used the very common txtDate, the
problem would not have happened.
Au contraire. If the control were named "txtDate", but the field named
"Date" were still in the form's recordsource -- whether the control were
bound to that field or not -- the problem would still have occurred.
You'd still need to refer to VBA.Date to keep Access from understanding
"Date" as the field. Without any qualification of the name, Access will
find the field and control objects before the VBA function. So reserved
words shouldn't be used for control *or* field names.