469,326 Members | 1,359 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,326 developers. It's quick & easy.

Removing options from droplist once selected

I am a United States Marine. I am creating a data base to prevent the armorers from double issuing a weapon. I have greated a drop list that looks up values (weapons serial numbers) from a weapons table. When the weapon has been selected it is saved in the main table. How do i make that particular serial number not available on the drop list, and to only show weapons that are available for issue?
Jan 7 '12 #1
6 1213
12,516 Expert Mod 8TB
As the source of the combobox, use a query that left joins to the main table and keep only the ones where it's null in the main query. That will leave only the ones that aren't in the main query.
Jan 7 '12 #2
Rabbit, Thank you for taking your time to answer my question.
What do you mean by "left joins"? Can you please elaborate a little more on your answer.
Jan 7 '12 #3
12,516 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. SELECT someFields
  2. FROM someTable
  3. LEFT JOIN mainTable
  4. ON someTable.weapon = mainTable.weapon
  5. WHERE mainTable.weapon IS NULL
Jan 7 '12 #4
I just might be stupid but I dont get it. I hope that you understand that I am a Marine and what im best at is killing the enemy of the United States. Computers, and Microsoft Access im just learning. If you can break it down for me Barney style it would be great.
Jan 7 '12 #5
12,516 Expert Mod 8TB
Basically, you take that, put in your table names and field names. Then use that as the record source for the combo box.
Jan 8 '12 #6
32,181 Expert Mod 16PB
This short article on SQL JOINs may help you to understand better what Rabbit is saying.
Jan 9 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by smash2004 | last post: by
8 posts views Thread by Matt Kruse | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.