Quote:
Originally Posted by MikeTheBike
Hi
On the basis that 'FieldName2' is the name of the field that is bound to a CheckBox control of the same name, then any of these will set it to yes/true
[FieldName2] = True
FieldName2.Value = True
Me.Controls("FieldName2") = True
Dim intcount As Integer
intcount = 2
Me.Controls("FieldName" & intcount) = True
I think it is the last one you are looking for !?
MTB
Thanks Linq and MTB for your answer. I now have the correct setting in my application.
I am quite new to the Access VBA syntax and got a bit consfued with the various syntax you suggested.
1. Why do some codes use the following syntax:
"FieldName.Properties("Value") = xxx" instead of directly use the syntax "FieldName.Value = xxx"?
2. Are there situations that one should use the first one instead of the other?
3. What are the valid situations to add ".Control" before the field name?
Thanks again for your reply.
BL