Results 1 to 12 of 12

Form/Subform Control

  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
    10,907
    You have your mainForm DataEntry property set to YES don't you? Why?
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,907
    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?
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,907
    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?
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,907
    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.
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,907
    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.
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  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
    10,907
    If you are good to go, go ahead and use the Thread Tools and mark this thread as Solved.
    (RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 Pro - acXP, ac07, ac10, ac13
    If your issue is resolved...go ahead and use the Thread Tools at the top of the thread and mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

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