Results 1 to 2 of 2
  1. #1
    williamc3502 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    5

    Update the subform with query results in a main form

    Hello everyone, I am new in ms access and want to ask for helps.

    I created a main form containing list boxes and a subform. What I want to do is to select items in the list boxes. Then, by clicking "Search" button, the data filtered by the selected items will be shown in the subform. But the subform cannot work and show the query results. I think I miss some VBA codes. Can anyone help me to take a look of my database? Thanks a lot!



    Complaint Database_William.zip

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    It looks like your code is not at fault. The problem lies in your form. You have the main form bound to the complaint table; it should be unbound. Secondly and most important to your issue, is that you had the subform linked to the main form via to the refnum field. Having this prevented the subform displaying data because their was no bound refnum control on the main form so the subform could not join to it. To solve the issue, I removed the complaint table from the main form's record source, and I removed the refnum join between the main and subform. The corrected DB is attached; the subform is showing records. You will have to verify whether it is showing the correct records.
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 3
    Last Post: 04-17-2012, 10:28 AM
  2. Replies: 3
    Last Post: 03-11-2012, 08:24 PM
  3. Replies: 6
    Last Post: 11-17-2011, 10:50 PM
  4. Totals from subform to main form
    By kathi2005 in forum Forms
    Replies: 4
    Last Post: 11-04-2011, 10:19 AM
  5. Query Results are Clickable to Update Form
    By chasemhi in forum Forms
    Replies: 0
    Last Post: 03-24-2011, 08:01 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