reference to control from query

  • Thread starter Thread starter 123
  • Start date Start date
1

123

Thank you

I'm using this reference to reference criteria in form but it is very
complex is there any solution very easy then this or is there any wrong in
this refrence:



[Forms]![FormName][ControlName1] or [Forms]![FormName][ControlName1] or
[Forms]![FormName][ControlName3] or Between Forms]![FormName][ControlName4]
and [Forms]![FormName][ControlName5]
 
Hi,


A full formed criteria is of the form

FieldName = something


In your case, you do not have a field name.


Next, you need a ! between the form name and the control.

Furthermore, it would be preferable to:


" FieldName = Forms!FormName!ControlName1
OR FieldName = Forms!FormName!ControlName2
OR FieldName = Forms!FormName!ControlName3
OR FieldName = Forms!FormName!ControlName4"


Finally, a single value cannot BE equal to TWO things at the same time:


x= 5 AND x= 6


is never possible, since if x=5, it can't be equal to 6. The AND you
use near the end is suspicious.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top