Hi Steve,
I never use "Me" before control names, so I missed that. You got my curiosity up so I created a Form with a checkbox and tried the code both ways:
If Me!checkbox1 = True Then
MsgBox "Check box checked."
Else
MsgBox "Check box not checked."
End If
And
If Me.checkbox1 = True Then
MsgBox "Check box checked."
Else
MsgBox "Check box not checked."
End If
When I typed "Me.", the checkbox name showed up in the list along with the Properties. When I typed Me! nothing showed up in the list. However, I ran it both ways and got the exact same results. Here's what the Help says about use of the ! and . operators:
You use the ! and . (dot) operators in an identifier to indicate the type of item that immediately follows.
The ! operator indicates that what follows is a user-defined item (an element of a collection). For example, use the ! operator to refer to an open form, an open report, or a control on an open form or report.
Identifier Refers to
Forms![Orders] The open Orders form
Reports![Invoice] The open Invoice report
Forms![Orders]![OrderID] The OrderID control on the open Orders form
The . (dot) operator usually indicates that what follows is an item defined by Microsoft Access. For example, use the . (dot) operator to refer to a property of a form, report, or control.
Note You can also use the . (dot) operator to refer to a field value in an SQL statement, a Visual Basic for Applications method, or a collection. For example, the identifier Forms![Orders].Controls refers to the Controls collection of the Orders form. However, because the Controls collection is the default collection for forms and reports, it's usually not necessary to refer to it explicitly.
_____
This sounds like what you said, but it seems to work both ways. This is just one example of why Access is so confusing. Do you know why it worked both ways? Please note that the purpose of this post isn't to make you look bad. I am just trying to learn more about this language. Maybe it's time to go back to FoxPro! lol
Best regards,
dz
dzaccess@yahoo.com