Full Version: More Than One stLinkCriteria
UtterAccess Forums > MicrosoftŪ Access > Access Forms
Ueberyak
I have one form which contains two values I want to use as a filter for a subsequent form. I can get either of the following criteria to work singly, but not together.
!--c1-->
CODE
  "[Date]=" & "#" & Me![Text6] & "#"

CODE
"[Shift]=" & "'" & Me![Text2] & "'"

Oknow I should be able to use both values but I can't get them to work as a combined criteria.
Thanks In Advance,
Josh
Ueberyak
I should point out that I tried the following to no avail.
CODE
"[Date]=" & "#" & Me![Text6] & "#" And "[Shift]=" & "'" & Me![Text2] & "'"

CODE
"[Shift]=" & "'" & Me![Text2] & "'" and "[Date]=" & "#" & Me![Text6] & "#"
Ueberyak
Woops, I had two extra quotation marks in there. It works like this:
CODE
"[Shift]=" & "'" & Me![Text2] & "' and [Date]=" & "#" & Me![Text6] & "#"
vtd
... and the Field name "Date" may give you a few problems in the future as "Date" is a reserved word for the VBA function Date().
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.