You're using single quotes as delimiters. Does any of the data have an
apostrophe in it? What are the data types of the two fields in the
underlying table?
This part is probably the problem:
& "'" AND "[ MacPacNumber]="
Should be
& "' AND [MacPacNumber]="
The AND needs to be inside the quotes. It is part of the text being passed
to strLinkCriteria. The &'s are the "ands" for the concatenation.
Just to nit-pick a little.
]=" & "'" &
You don't need the extra set of quotes and & (but it shouldn't hurt
anything), this could be just
]='" &
"[ MacPacNumber]=", ![ txtMacPacExisting]
There is a space in front of the M and the t.
--
Wayne Morgan
MS Access MVP
"2D Rick" <rb*******@compuserve.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
I need help getting this syntax to work.
I want to open a form to a specific record based on dual criteria.
Both fields are text fields as is the input.
I get an error message "type mismatch"
stLinkCriteria = "[PartNumber]=" & "'" & Me![txtPartNumber] & "'" AND
"[ MacPacNumber]=" & "'" & Me![ txtMacPacExisting] & "'"