Not Getting Any Records

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

Guest

The following SQL returns nothing. What am I missing? Entered [Smith John]
on form. Record is in table Staff.

SELECT [Staff].[Last Name], [Staff].[First Name], [Staff].[ID No], [Last
Name] & " " & [First Name] AS Name
FROM [Staff]
WHERE (([Last Name] & " " & [First Name]) Like [Forms]![frmFind Staff]);
 
Two problems. One small and the other the real problem. The big one first:

Like [Forms]![frmFind Staff]);
What control or text box are you talking about?

Like [Forms]![frmFind Staff]![YourTextBox]);

The small one is Like. Like is used with wildcards. Better to use = instead
of Like if you want exact matches.
 
Back
Top