0

I'm working with database with criteria code for the posting date: where >=CDate(format([Date Table]![end date]) This is not the exact syntax as im not at work, but does anyone know what the ! Means and what this might be trying gto do? End date is a field in Date Table. Thanks for any help.

1 Answers1

1

"Identifier Operators are the shorthand of object oriented systems. These are the ! and . symbols that you may have seen in macros or queries. These operators show that one element of an expression belongs to another. You use the ! operator (also known as the "bang" operator) when you are referring to an object that you created, such as a field or form. You use the . operator (also known as the "dot" operator) to refer to a control name or something that Microsoft Access created such as a property. Generally, you'd like to use a . over ! because a . provides compile time validation which can catch typos and invalid references. The bang operator ! is only evaluated when the code is executed and would cause a runtime error."

For your specific case, it is used to refer to the [end date] control on your [Date Table] form. Or more simply-- shorthand for

[Date Table].Controls("[end date]")
exception
  • 301
  • 2
  • 6