Hi All --
I am kind of stuck on a combobox. What I have are 2 tables which are joined by badge_number and then I have a sign-in and sign-out field. On the form I have a combobox that displays a list of badge numbers that are supposed to be available but I keep showing all of them. I built a query to says something like if sign-out is null then show the badge number or if sign out isn't null and sign-in is then don't show.
Basically, if it has never been signed out or has been returned then show the badge number in the drop down if it is signed out but hasn't been returned then don'show.
Any idea on how to accomplish this?
Here is what I have in the sql query:
thanks in advance
I am kind of stuck on a combobox. What I have are 2 tables which are joined by badge_number and then I have a sign-in and sign-out field. On the form I have a combobox that displays a list of badge numbers that are supposed to be available but I keep showing all of them. I built a query to says something like if sign-out is null then show the badge number or if sign out isn't null and sign-in is then don't show.
Basically, if it has never been signed out or has been returned then show the badge number in the drop down if it is signed out but hasn't been returned then don'show.
Any idea on how to accomplish this?
Here is what I have in the sql query:
Code:
SELECT DISTINCT Badges.Badge_Number, Client_Info.Badge_Signout_Date, Client_Info.Badge_Return_Date
FROM Badges LEFT JOIN Client_Info ON Badges.Badge_Number = Client_Info.Badge_Number
WHERE (((Client_Info.Badge_Signout_Date) Is Null)) OR (((Client_Info.Badge_Return_Date) Is Not Null));
thanks in advance