Results 1 to 2 of 2
  1. #1
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89

    Subform Help

    In access 2007, I have a form with combo boxes Name, Address, and Contact Info. They are cascading combo boxes to make it easier on the people filling out the name, since the same information is often used again.

    However, when there is new information, they want it set up (they suggested a subform) so you click a command button to open it, and on the subform lists: name, street address, city, state, zipcode, work phone, home phone, fax, email.



    I somehow have to get the Street address, city, state, zipcode to combine together in the Address box on the main form. and Work phone, home phone, fax, and email to combine together in the Contact Info box on the main form. Is this even possible? Please Help.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Yes it is very possible. Let's say you have the subform set up - then we assume data put into it does write to the underlying table.

    This means that if you close your main form (and subform) - and then reopen the main form - that you will now see the info in those combo boxes.

    This is key - because you have to close & reopen that form. The reason is that the data that goes into those comboboxes is correct the moment you open the form. If you then add more data via the subform, the comboboxes haven't had a chance to be updated.

    The more elegant method is to force those comboboxes to requery. This is a standard VBA method that you can use - and trigger it perhaps in the closing of the subform.

    Hope this helps.

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

Similar Threads

  1. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  2. Replies: 4
    Last Post: 04-07-2011, 03:39 PM
  3. Replies: 1
    Last Post: 03-15-2011, 03:53 PM
  4. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  5. Replies: 15
    Last Post: 11-09-2010, 04:27 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