Results 1 to 12 of 12
  1. #1
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246

    Combo only refreshes form intermittently

    I have a main customer form. First tab in the database. At the top of the Customer form is a Combo Box. You select the customer from the combo box and the customer form is refreshed with that customer's data.



    Now when you select some customers from the combo box it refreshes with the correct customer information. Other times the form won't refresh, it just pulls up the first customer in the customer table.

    I have been through the data it seems correct.
    I have been through the code and it all seems correct.
    I have placed watches on the combo box code and it is correct.
    I can't find any errors but it intermittantly fails to refresh.
    All the data is correct. This has worked fine for a while but is now failing to refresh intermittantly.

    I am not receiving any error messages, just no refresh to the matching data.

    I have attached the database. I have chopped out all unnecessary stuff to get it down to size. The only tab with a problem is the first tab "Customer".

    MenuPro PhaseIIA - Source.zip

    Any insight is appreciated.

    Phred

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not every customer has a record in the form. I suspect the behavior you're seeing happens when you choose one of those. It would either stay on the record it was on or go to the first record.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Issue is including tblSites in SubFrm_Customers record source. The 1 to many relationship causes multiple customer records and the jointype excludes some customers. Why do you need the DtMenuAdded field from tblSites? Remove tblSites and you should see correct performance for the record search.

    Also, don't think need 3-level form arrangement. Could bind Frm_Main to tblCustomers and put all the customer info fields directly on the Customers tab. Then have SubFrm_CustomerSites directly on the same tab.
    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.

  4. #4
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    I'm not sure what you are seeing. The combo calls the customers listed in the Customer Table. There are 21 customers in the combo and there are 21 customers in the table. When you select Kids Station from the combo the information directly below the combo refreshes with the correct customer information for Kids Station.

    If you select Addus from the Combo Box the form directly below does not refresh with Addus it refreshes with the first record in the Customer table.

    Remember I am not talking about the sub form "Sites" Some customers do not have sites but that is not related to the Customer parent form not refreshing.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    There are NOT 21 customers in the form the combo is part of. There are 12 records with about 8 customers. As June jumped in to mention, the form should probably only be bound to the customers table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    My comments still apply, except I referenced wrong form name (I edited the previous post to reflect).

    SubFrm_Customers record source includes tblSites, remove tblSites.
    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.

  7. #7
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246

    Moderator please help.

    Moderator. I want to upload the database with the changes you recommended. I am unable to do so. I need to delete the file I previously uploaded and upload the new file with the changes. I cant figure out how to do it.
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Not necessary to remove file, as you must now know because I have your revised file.

    However, it does not reflect the changes I suggested. Reread my posts and modify the earlier version accordingly.

    Remove tblSites from the query that is the RecordSource for SubFrm_Customers, just bind the form to tblCustomers.
    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.

  9. #9
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246

    New Modified Database named MenuProFred

    I have renamed the ziped file MenuProFred so the difference is clear.MenuProFred.zip

    This should be the correct one.

    Thank you for your efforts to help me. I need you to explain things more.

    1. I completely deleted the 1-to-Many relationship between tbl_Customers and Tbl_sites. There is no relationship now. I still have the same problem.
    2. I completely deleted the SubFrm_CustomerSites from the SubFrm_Customer form. The sites are no longer on the form and there is no relationship. I still have the same problem.
    3 The reason you see to many levels of forms is due to my inexperience.
    4. This combo box and form has been working for months. Now all of a sudden there is a problem. With the relationship deleted and the table and form removed from the Customer form it still doesn't work.

    Paul, I gotta be counting the wrong thing or referencing the wrong thing. I downloaded the database I uploaded. In the Customer Table there are 21 customers. In the Sites table there are 12 sites.

    Fred

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Yes, the TABLES have those records but as explained earlier, the query for SubFrm_Customers RecordSource prevents all customers from showing and it also replicates customer 114. Open the form's RecordSource in datasheet view and you will see this.

    Again, you have not done what was instructed.

    1. Go back to the original file you posted.

    2. Change the RecordSource of SubFom_Customers to: tblCustomers

    Then, if you want to change 3-level forms to 2-level forms:

    1. Set Frm_Main RecordSource to tblCustomers

    2. Move all the customer info controls from SubForm_Customers to the Customers tab

    3. Put SubFrm_CustomerSites also on the Customers tab


    BTW, if that db has real info, might want to remove it from post.
    Last edited by June7; 08-24-2012 at 01:07 PM.
    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.

  11. #11
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    June7 and Paul

    Thanks for all your help. It took me a while to figure out what you were saying.

    I can't figure out how to remove the database from the post. It doesn't show up in the Manage Attachments screen. I don't find any other delete function.

    How do I remove it?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Don't have to remove it, can leave it there forever.

    In the Attachment Manager window, should see that post's attachment icon in a section at the bottom of the window. Click the little x that appears when you hover over the icon. This will delete from post but not from the forum.
    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. Popup form refreshes main form?
    By kawi6rr in forum Programming
    Replies: 2
    Last Post: 08-04-2012, 09:17 AM
  2. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  3. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  4. CrossTab query works intermittently
    By mlcohenaz in forum Queries
    Replies: 1
    Last Post: 06-01-2010, 09:23 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 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