Removing options from droplist once selected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Luis Del Valle
    New Member
    • Jan 2012
    • 3

    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?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    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.

    Comment

    • Luis Del Valle
      New Member
      • Jan 2012
      • 3

      #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.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Code:
        SELECT someFields
        FROM someTable
        LEFT JOIN mainTable
        ON someTable.weapon = mainTable.weapon
        WHERE mainTable.weapon IS NULL

        Comment

        • Luis Del Valle
          New Member
          • Jan 2012
          • 3

          #5
          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.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            Basically, you take that, put in your table names and field names. Then use that as the record source for the combo box.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32662

              #7
              This short article on SQL JOINs may help you to understand better what Rabbit is saying.

              Comment

              Working...