Results 1 to 3 of 3
  1. #1
    rwahdan1978 is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Jun 2024
    Posts
    57

    Get all items in a listbox

    Hi,



    I have 2 lists and each have items. I am moving items between two lists and after done I have a submit button. In the click event for the submit button I need to check the data in the table used in this form (Org ListT)that has the 2 lists with another table (Correct List) and check if they are the same or not. How to do that?

    To make it clear, here are the tables:

    Org ListT:
    Click image for larger version. 

Name:	2.jpg 
Views:	13 
Size:	45.9 KB 
ID:	52084

    Correct List:
    Click image for larger version. 

Name:	1.jpg 
Views:	14 
Size:	47.7 KB 
ID:	52085
    Last edited by rwahdan1978; 08-06-2024 at 11:08 AM. Reason: make it clear

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    I suspect "Sharpner" is not correct even if is in the "Correct" list. You are not really explaining what you are checking, the fact that the item is in the "correct" list and therefore "available" (why have two lists to begin with?), if they are Deleted in the "Correct" list and therefore not available, are there quantities involved, etc.
    The easiest way to check if have an entry in other table is using a dCount with criteria:
    Code:
    If dCount("*","[Correct List]","ItemName='" & [ItemName] & "' And [Deleted]=False") > 0 ' you now know it is in the list and not Deleted
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

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

Similar Threads

  1. Listbox Items Shown Twice
    By Voodeux2014 in forum Forms
    Replies: 3
    Last Post: 11-12-2015, 10:46 AM
  2. Adding all items in ListBox
    By Voodeux2014 in forum Programming
    Replies: 12
    Last Post: 11-10-2015, 01:31 PM
  3. how to de-select items in a listbox
    By CharbelKahi in forum Programming
    Replies: 1
    Last Post: 06-23-2014, 07:05 AM
  4. Tallying a listbox's items
    By lyrasphere in forum Access
    Replies: 3
    Last Post: 05-22-2014, 08:12 AM
  5. Selected items in listbox
    By tomodachi in forum Access
    Replies: 1
    Last Post: 09-09-2010, 01:14 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