By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

Removing options from droplist once selected

P: 3
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
Share this Question
Share on Google+
6 Replies

Expert Mod 10K+
P: 12,421
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

P: 3
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

Expert Mod 10K+
P: 12,421
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

P: 3
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

Expert Mod 10K+
P: 12,421
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

Expert Mod 15k+
P: 31,709
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.