2ShotLatte
Technical User
Greetings
I have a query that uses a public variable (varHall). The query returns only records where tblStaff.Hall and varHall are equal. I also want the query to return all records if varHall is null. Here's what I've done so far, but I'm stumped after that.
Select tblStaff.StaffID, tbleHall
From tblStaff
WHERE (((tblStaff.Hall)=varHall()));
I've tried IsNull, but not sure if I'm getting the syntax right or just completely off. I'm hoping some Access Gods out there can help.
Thanks!
Steve
I have a query that uses a public variable (varHall). The query returns only records where tblStaff.Hall and varHall are equal. I also want the query to return all records if varHall is null. Here's what I've done so far, but I'm stumped after that.
Select tblStaff.StaffID, tbleHall
From tblStaff
WHERE (((tblStaff.Hall)=varHall()));
I've tried IsNull, but not sure if I'm getting the syntax right or just completely off. I'm hoping some Access Gods out there can help.
Thanks!
Steve