Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox Query Assistance

Status
Not open for further replies.

DarkOne72

Technical User
Jun 14, 2002
210
US
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:
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
 
Thank you for the reply ! Yes, it can bu used with multiple clients but only one at a time and so it can't be issued out until it is returned; almost like a book at a library.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top