
Signature
George Nicholson
Remove 'Junk' from return address.
> 1) Unless you have fields named FORMS!FORMNAME.[STUDENTID] and
> FORMS!FORMNAME.[GRADE_YEAR], you have things backward. (Access
> expects Field = Value syntax, not Value = Field)
No, equality is equality, and it doesn't matter which order the operands
are in.
> 2) FORMS!FORMNAME.[GRADE_YEAR], etc is a dynamic variable. You want
> Access to "look up" that value at runtime. Placing it within double
> quotes makes it a literal value and Access will use
> FORMS!FORMNAME.[GRADE_YEAR] literally. You need to use concatenation
> to construct your criteria.
No, in the domain aggregate functions Access will interpret this
reference as a parameter and resolve it for you.
These are not the problems in the OP's expression.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
AccessHelp - 11 Oct 2005 22:08 GMT
Thanks guys. I will try them.
> > 1) Unless you have fields named FORMS!FORMNAME.[STUDENTID] and
> > FORMS!FORMNAME.[GRADE_YEAR], you have things backward. (Access
[quoted text clipped - 13 lines]
>
> These are not the problems in the OP's expression.
Michel Walsh - 12 Oct 2005 15:40 GMT
Hi,
... I will even add that since you don't need any delimiter, the syntax is
even easier letting FORMS!FormName!ControlName "inside" the criteria. And
not only delimiters, but for dates, as example, you also have to format the
result into a US format (in case the user use another date format, such as
in an English Canadian format) and that is not even about thinking about the
decimal dot which can be a coma! A nightmare! Much-much, much, better is to
leave the FORMS!formName!ControlName INSIDE the criteria string, as Dirk
suggested, and you don't have to think to any of these potential problems.
Hoping it may help,
Vanderghast, Access MVP
>> 1) Unless you have fields named FORMS!FORMNAME.[STUDENTID] and
>> FORMS!FORMNAME.[GRADE_YEAR], you have things backward. (Access
[quoted text clipped - 13 lines]
>
> These are not the problems in the OP's expression.
AccessHelp - 12 Oct 2005 19:21 GMT
Thanks guys. I got it working.
> > 1) Unless you have fields named FORMS!FORMNAME.[STUDENTID] and
> > FORMS!FORMNAME.[GRADE_YEAR], you have things backward. (Access
[quoted text clipped - 13 lines]
>
> These are not the problems in the OP's expression.