Access Expression Question

laura.barrows

New member
Local time
Today, 05:17
Joined
Oct 25, 2012
Messages
5
Does anyone know how many characters can be used in a expression?
Mine is not working....it has 126.
[ASS_Cini2]![Itin_Date]=[Forms]![Cinci_Itinerary]![Itin_Date] And [ASS_Cini2]![Itin_Date]=[Forms]![Cinci_Itinerary]![KFM_Name]
 
I'm sure it's more than 126. This specification says a query parameter can be up to 255 so I suspect it can be at least that many.

Your expression seems rather strange. How could (or why would) [ASS_Cini2]![Itin_Date] be equal to [Itin_Date] and [KFM_Name] in the form at the same time. That's the only way the expression would evaluate to true.

Where is this expression being used? What is [ASS_Cini2]![Itin_Date]? How is this not working? Are you getting an error or just not the result you expect?
 
Thanks so much. It is a expression that will allow me to pull changes in itineraries. I finally figured it out and transposed the expression and it worked.
Go figure Access is not a easy program!!

Thanks!
LB
 
The question of why it is (was) not working might be answered if you decided the order in which you wanted the elements to be evaluated. Eliminating the various references, you have something of the form A AND B = C which is hard to be sure regarding default evaluation. I think it is treated as A AND ( B = C ) because I think relationals (the = sign) are higher in operator precedence than Booleans (the AND). If that is what you wanted, you might be OK. But if you wanted something more exotic, or any time you are in doubt, use explicit parentheses.

You have to remember that if you do the Logical AND of a number, Access will try to silently "promote" the variable in a way to allow the bitwise Boolean expression to be executed. A bitwise Boolean operation between two dates - if they are from the same general time frame - might still be a date and would be comparable to another date, because if the dates are close, their signs, exponents, and at least the first three or four bits of their mantissas (mantissae?) would be the same, thus would be preserved sufficienatly across the AND to still look like dates.
 

Users who are viewing this thread

Back
Top Bottom