Results 1 to 3 of 3
  1. #1
    WallyZ is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    18

    Need help understanding listbox and textbox connection.

    I inherited a simple unbound form that contains 4 textboxs and 1 listbox on it.



    The textboxs all have their after update event Embedded macro set to Requery the listbox.

    The listbox has a static sql select statement in the recordsource. There appears to be no filter criteria in this record source.

    The names of the textboxs do not correspond to the columns in the sql statement. As an example textbox 1 is called ProductNoTxt. Column 1 in the sql is "[Product Number]". Close but no cigar.

    When I enter a value in one of the textboxs it filters the listbox correctly on the values I enter.

    So my questions are:

    How does the listbox get its sql filter criteria from the textboxs?
    What links them together?

  2. #2
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    I'm afraid we can't guess what's going on without seeing the form and code.

  3. #3
    WallyZ is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    18
    Worked it out in the end.

    That sql statement wasn't as static as i thought. It was selecting columns from a query and it was in the the query that the criteria was linked to the forms controls!

    Learn something everyday!

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

Similar Threads

  1. Listbox and textbox verification
    By princess12 in forum Access
    Replies: 3
    Last Post: 04-06-2015, 11:06 PM
  2. Using a Listbox to populate a Textbox.
    By IncidentalProgrammer in forum Forms
    Replies: 7
    Last Post: 10-29-2014, 12:32 PM
  3. Replies: 5
    Last Post: 06-11-2014, 05:10 PM
  4. Replies: 2
    Last Post: 03-23-2014, 06:50 AM
  5. import all data from listbox to a textbox
    By mikael in forum Access
    Replies: 8
    Last Post: 09-09-2012, 07:16 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