H
Hugh self taught
Hi Guys & Gals,
I have a form with a (not yet hidden) text box referencing Column(1) of a
cbo. I then use that in a sql data parameter as follows:
SELECT Candidates.Candidates_Idx, Candidates.FirstName & " " &
Candidates.Surname AS Name, Types.Designation
FROM Candidates INNER JOIN Types ON Candidates.Type = Types.Types_Idx
WHERE ((([Forms]![frmCandidates]![HiddenColRef])<>[Types].[Designation] And
([Forms]![frmCandidates]![HiddenColRef])<>"Companion"))
ORDER BY Candidates.FirstName & " " & Candidates.Surname;
The first part of the WHERE expression
"((([Forms]![frmCandidates]![HiddenColRef])<>[Types].[Designation]" works
fine, but the 2nd part "And
([Forms]![frmCandidates]![HiddenColRef])<>"Companion"))" doesn't work at all.
In fact if I remove the first part I see all records. It's as though the
reference to a text value doesn't work but reference to a table field value
does.
Any suggestions on getting around this?
I have a form with a (not yet hidden) text box referencing Column(1) of a
cbo. I then use that in a sql data parameter as follows:
SELECT Candidates.Candidates_Idx, Candidates.FirstName & " " &
Candidates.Surname AS Name, Types.Designation
FROM Candidates INNER JOIN Types ON Candidates.Type = Types.Types_Idx
WHERE ((([Forms]![frmCandidates]![HiddenColRef])<>[Types].[Designation] And
([Forms]![frmCandidates]![HiddenColRef])<>"Companion"))
ORDER BY Candidates.FirstName & " " & Candidates.Surname;
The first part of the WHERE expression
"((([Forms]![frmCandidates]![HiddenColRef])<>[Types].[Designation]" works
fine, but the 2nd part "And
([Forms]![frmCandidates]![HiddenColRef])<>"Companion"))" doesn't work at all.
In fact if I remove the first part I see all records. It's as though the
reference to a text value doesn't work but reference to a table field value
does.
Any suggestions on getting around this?