bobrossi56
asked on
Access 2003 Query Criteria
I have a query that asks the user for a date range and a student name. This works fine. However, I want to have it show ALL students if the user leaves the student name prompt blank. is that possble?
thx experts...BobR
thx experts...BobR
ASKER
SELECT tblHorseAssign.ReportDate, tblHorseAssign.HorseName, tblHorseAssign.ReportedBy, tblHorseAssign.Paid, tblHorseAssign.PaidBy, tblHorseAssign.StartTime, tblHorseAssign.EndTime, tblHorseAssign.StudentName
FROM tblHorseAssign
WHERE (((tblHorseAssign.ReportDa te) Between [Enter Start Date] And [Enter End Date]) AND ((tblHorseAssign.StudentNa me)=nz([En ter Student Name],[Student Name])));
FROM tblHorseAssign
WHERE (((tblHorseAssign.ReportDa
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Works great...thx
nz([Enter Student Name],[Student Name])
this is assuming that the name of the field you are applying the criteria is [Student Name]
post the sql of the query you are using..