Results 1 to 12 of 12
  1. #1
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12

    Form/Subform Control

    When using a subform which contains detail information in a form containing customer header info ( name, address, etc.) is it possible to have both forms updated with information before the records are written? The problem I am having is that when moving from the main form fields to the subform fields, the main form automatically saves and then goes blank so the user can't tell which customer record is being affected. How can I structure this so the user sees all the fields before any records are committed?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You have your mainForm DataEntry property set to YES don't you? Why?

  3. #3
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12
    Actually no, the Data Entry field on the Data tab is set to NO for all of my forms.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When moving the focus from MainForm to SubForm or back, if the form you are leaving is "Dirty" then the current record *will* be saved. That is the way Access Form/SubForms work and is usually not a problem. That still does not explain why your MainForm goes blank. Do you have some code in the BeforeUpdate or AfterUpdate event of the MainForm?

  5. #5
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12
    No, nothing in those fields on the main form but I think I figured out my problem. When editing the form/subform, the main form's fields appeared in the form header while the subform appeared in the detail section. This was making it difficult to use TAB ORDER to get from the main form fields to the subform fields. I fixed this by moving the main form's fields into the detail section directly above the subform and that fixed the TAB ORDER issue but created the disappearing record issue when I tabbed from the last main form field to the first subform field. After moving those main form fields back into the header, the disappearing issue is fixed but now I still can't tab around all of the fields because the header/detail issue. Maybe an ON EXIT and GOTO Control is the workaround but I think I'm still missing something here.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Having the MainForm fields in the Detail section of the MainForm should not be a problem. There is a Cycle property on the Other tab of the MainForm property sheet. To what is it set?

  7. #7
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12
    Cycle is set to ALL RECORDS. I did verify this problem too on a different form where the main form data disappears when you exit out of the last field and tab into the subform fields (set in order by TAB ORDER function). The main form data is saved but invisible to the user. When I move those fields back into the header section, the problem is solved but the user is frozen in the main form fields and cannot tab into the subform fields. The cursor must be placed in the subform to begin entering that data.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try changing the Cycle property to Current Record. It sounds like your MainForm is moving to a new record when you tab into the SubForm.

  9. #9
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12
    Bingo! Thanks RG that was it. Curiously, where the heck can I find out more about the details about this program...especially everything in the properties boxes? Can you recommend a reference bible?

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I started with acXP (2002) and help was pretty good but I understand ac97 Help was even better. I've watched Help go downhill with each release of Access. My method was simply years of doing it wrong. Maybe Crystal has some help on her site: http://www.accessmvp.com/strive4peace/ I know she has lots of good stuff.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you are good to go, go ahead and use the Thread Tools and mark this thread as Solved.

  12. #12
    Dan Kenton is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    12
    Nice site indeed. Thanks for the link and the help!

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

Similar Threads

  1. Subform in a Tab Control on a Main form
    By jpkeller55 in forum Access
    Replies: 4
    Last Post: 01-08-2011, 12:31 PM
  2. add subform to TAB control?
    By haggisns in forum Forms
    Replies: 2
    Last Post: 10-13-2010, 07:21 AM
  3. Linking Subform Control to Main form
    By KWarzala in forum Forms
    Replies: 1
    Last Post: 03-13-2010, 08:32 PM
  4. Can't reference control in subform
    By evanscamman in forum Forms
    Replies: 0
    Last Post: 12-25-2007, 06:47 PM
  5. Form/Subform - Update control help!
    By f_ali in forum Forms
    Replies: 2
    Last Post: 02-26-2006, 12:59 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