TOO FEW PARAMETERS--HELP!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help me the following code...I keep getting a message that states TOO
FEW PARAMETERS!

SELECT [Mentor].[Mentor Id], [Mentor].[First Name], [Mentor].[Last Name],
[Mentor].[School]
FROM Mentor
WHERE ((([Mentor].[First Name])=[Forms]![Mentor Search Form]![First Name] Or
([Mentor].[First Name]) Is Null)) Or ((([Mentor].[Last Name])=[Forms]![Mentor
Search Form]![Last Name] Or ([Mentor].[Last Name]) Is Null)) Or
((([Mentor].[School])=[Forms]![Mentor Search Form]![School] Or
([Mentor].[School]) Is Null));
 
You say this is code? Is it in VBA or is it the SQL from the SQL view of a
query? If it is in VBA code, please show the entire statement. The problem
appears to be missing quotes around text values, but how they are put in
will depend on which of the two locations mentioned above that this is in.
 
Code, you said? The Expression Service is not available to resolve the
references to the forms when you OpenRecordset() in code.

Concatenate the values from the form into the string:

strSQL = "SELECT ... WHERE (([Mentor].[First Name] = """ & _
[Forms]![Mentor Search Form]![First Name] & """) OR ...
 
Back
Top