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
SELECT tblHorseAssign.ReportDate, tblHorseAssign.HorseName, tblHorseAssign.ReportedBy, tblHorseAssign.Paid, tblHorseAssign.PaidBy, tblHorseAssign.StartTime, tblHorseAssign.EndTime, tblHorseAssign.StudentName
FROM tblHorseAssign
WHERE (((tblHorseAssign.ReportDate) Between [Enter Start Date] And [Enter End Date]) AND ((tblHorseAssign.StudentName)=nz([Enter Student Name],[Student Name])));
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
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..