im using an access project file now and no longer a mdb file.
i used to prompt a user for the first and last name of the patient they were looking for using this statement like [forms]![main]![text0] & "*"
and like [forms]![main]![text2] & "*" then it would promt them to enter in a last name and a first name but if they only entered a last name and left the first name prompt empty it would give them all the last name they had entered .
now im on sql as my backend and i got my query working except
if i dont type anything in on the second prompt i get no records.
how can i fix this because the user doesnt always no the first name and would like to sort through the records by just the last.
my current statement that works as long as you fill in both prompts is a follows.
WHERE (lname LIKE @LastName + '%') AND (fname LIKE @firstname + '%')
ORDER BY chartnumber