I am wanting to do something that seems so simple in real life, but I am racking my brain trying to figure out how do do this in a database using only queries and forms with minimal or no programming. I created an equipment log. In real life, a technician or customer takes any piece of equipment, and signs it out. Until it is signed back in and returned, it is obviously not available. When it is returned, its available to sign out again. But if you make a table of equipment and use it in a combo box to select in an equipment sign-out database, ALL equipment is listed in the combo box no matter which ones are signed out. How do I limit my combo box to equipment that is remaining and available for sign out? Thanks!
Kevin Robertson
@Reply 4 years ago
Add a Yes/No Field to your Table (if you haven't already) and add criteria to this Field in your Query.
Base your Combo Box off of the Query you just built.
I made an image as a visual representation.
Kevin Robertson
@Reply 4 years ago
Scott Axton
@Reply 4 years ago
First don't be afraid of a macro or a little bit of VBA. Think of it this way: Access doesn't "automatically" know what you want to do. You as the database developer have to give Access the instructions on what to do. So "Programming" is really just writing down, in a language that Access understands, those instructions. You don't have to learn everything at once, just a bit at a time.
Second, I'm going to highly recommend that you consider a TechHelp membership. For about the price of a Starbucks per MONTH you get a ton of resources you don't get in the regular courses. The best in my opinion is the Gold because of the perks such as the Code Vault. Even more savings if you get the annual - save 20% more.
More info in check out the TechHelp Memberships page.
The Manage Rental Inventory video shows how to set up a simple check in /out system. The extended cut is really what you want to be looking at.
Check out the Query Criteria video to use as the data source for your combo box as well.
You will want a field in your equipment table "CheckedOut" - Yes/No datatype to limit the data of the Relational Combo.
Kerry SmythOP
@Reply 4 years ago
Kevin thanks! I think I went on such a design bender overnight that my brain was just fried. That does seem like a pretty simple solution. I'm having a few buggy issues on my continuous form that causes it to make a few errors (the combo box isn't updating consistently) but I added a 'requery' command on the fields upon clicking and that seems to have really tightened everything up. Thanks again!
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access TechHelp.