Results 1 to 6 of 6
  1. #1
    gbmarlysis is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    48

    Subform to show records of Listbox

    Hi,
    the form is a main form to the orderdetails table. on the form there are two listboxes one is attached to the CustomerTable one is for the StoreTable then the other fields are what was ordered how many etc that fill the OrderdetailsTable. When i pick the customer in the listbox i want all the cust. orders to show up in a subform so i can see what new orders still need to be entered for that customer.
    TY
    Luke

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Subform is on this main form?

    That arrangement is the reverse of conventional design but if it suits your needs ... try:

    Set criteria for customer ID of the subform recordsource to the listbox. Then in AfterUpdate event of the listbox, requery the subform. Actually, the requery needs to refer to the subform container control. I always give the container a name different from the object it holds.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    gbmarlysis is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    48
    Hi,
    not a list box actually a combo box. Cause the combo box is attached to a different table than the mainform, i cant get anything to work. I'm glad ur a VIP heres what i'm trying to do. i have a orderId form connected to orderId table. On this form i have a customer combo box linked to customer table and a store combo box linked to a store table. If its a new store or customer i have buttons that link to those forms. when i add a new order details entry it also adds the customer id and store id as they are in the order id table (foreign key). but to try and get the subform that is connected to the customer combo box thats not connected the main form is proving difficult..
    What do you think, am i making sense??
    TY

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not clear. Why doesn't work - error message, wrong results, nothing happens?

    Doesn't matter what table is RowSource of the combobox. Is the combobox on the main form? Show the SQL statement of the combobox RowSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    gbmarlysis is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    48
    Hi,
    Here is my db, i would like the racedetails form to have a subform that shows an athletes racedetails when their name is picked in the top combobox.
    Thankyou
    Database1.zip

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You are binding main form and subform to the same data source. This won't work. You might try a split form design. Or a single normal form with unbound search boxes in form Header and records in Detail.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-22-2011, 08:51 AM
  2. Show selected records in subform
    By Papilion in forum Forms
    Replies: 8
    Last Post: 06-18-2011, 07:41 AM
  3. Replies: 1
    Last Post: 03-15-2011, 03:53 PM
  4. Append Records using MultiSelect Listbox
    By Ted C in forum Programming
    Replies: 14
    Last Post: 03-15-2011, 01:25 PM
  5. Replies: 6
    Last Post: 03-27-2010, 11:18 AM

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