Results 1 to 9 of 9
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Combo box with list of Values that need to be taken away


    Hi guys,

    I have a combo box that has a list of cameras for people to choose from. After they select that camera, I want the value to go away from the combo box so the next person trying to borrow a camera won't select that same camera. How do I code this and when they decide to return the camera, how do I make that value go back on the combo box. If anybody knows how to do this way or another way, please let me know.

    Thanks!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Watch this free video from Datapig. It uses 2 listboxes --one for AvailableItems, the second for NoLongerAvailable.
    It's older but the concept is still relevant and on target!

    Good luck.

  3. #3
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Ok I got to work but it doesn't want to remove the camera of the list and put it back on the original when returning since its stored as a value on the table. How do I get it to remove off the list that's updated it from 1 to 0.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Watch the video again. You are moving the data from 1 list box to another. Not from table to table.

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,819
    Seems I have a different interpretation of the requirement.
    I think that your table needs a field you can use to identify what has been checked out. While you could use a Yes/No, T/F checkbox field, I think a ChkOutDte is a better option if you have multiple records in this table for any given piece of equipment. If a record has a checked out date, but not a ChkInDte, then it's out. If there's a checked in date, it's back. This way, you'd have a history.

    If it's one record per item, then a status field (basically what I was referring to above) may be sufficient. Unless you have other tables that provide a loan history for an item, there's no history just using a checkbox field. You can tell what's out, but not how often or anything about duration.

    Regardless, once you have this field, you include it in the rowsource sql or query that populates the combo so that it doesn't list items that are out on loan.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Hmmm maybe we need to hear more of the requirement. The table in the video has fields for the Location and Deleted. He uses both in the listboxes --one with Deleted =0 the other with Deleted = 1. The concept is Available/ not Available which is how I interpreted your post.
    However, based on Micron's comment, I see there could be a lot more info recorded than the "current availability".
    If you have Customers, Cameras, Loans, History etc, then we'd like to hear more of your requirement and a look at your tables and relationships.
    In my mind, if this is a business where items are loaned to and returned from Customers, then it seems like a "library" application.

    Good luck with your project.

  7. #7
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,819
    I kinda took the risk that the video was only about moving items from 1 list to another because it wouldn't open for me.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Micron,
    I had an issue with Firefox ESR 52 and flash. I could open flash video with chrome and I did update flash plugin for Firefox.
    The Datapig Access series is quite good --older version, but clear concepts.

  9. #9
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    So like I said, I got the list to work where I add the camera to the other list of cameras that have been taken out and got it to go back to the other list. But I set the control source of the list to the value to be recorded in the table even with a check out date so it records which user took which camera. The problem is that when they return the camera, I can't get the function to put the camera that was taken out to be put on the other list of cameras availlbe since I set the control source. Is there another way? Hopefully this makes sense.

    Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 03-07-2017, 03:01 PM
  2. Replies: 11
    Last Post: 07-15-2016, 09:39 AM
  3. Combo List Values to Ignore Certains Records
    By breakingme10 in forum Queries
    Replies: 5
    Last Post: 01-16-2014, 01:43 PM
  4. Replies: 1
    Last Post: 10-03-2012, 04:12 PM
  5. Combo Box - Field List Values
    By jennyaccord in forum Forms
    Replies: 5
    Last Post: 07-29-2011, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums