Results 1 to 5 of 5
  1. #1
    weghjiu is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Apr 2014
    Posts
    2

    Tabbed sub-form not retaining field updates in "Edit" mode


    I have a switchboard – button #1 will open the data entry form in Add mode, and button #2 will open the same data entry form in Edit mode. The form itself has a series of fields at the top, then at the bottom a subform with 2 tabs on it with more fields. I will call the tabs A and B for reference. If a certain combo box on the main form has selection “A” selected, then I have code in the Update Event of that combo box to hide tab B because there are questions that do not apply, the user will only need to see tab A at this point. Vice versa too – If the combo box on the main form has the “B” selection, then tab A on the subform will be hidden and the user will move forward with data entry on tab B.

    This all works just fine in the “Add” mode from the Switchboard navigation. However, when I go to Edit previous records from the second button on the Switchboard (which will be important for users to do) - the records I entered dummy data into show both tabs instead of the one that applies to the combo box selection. I have tried entering some code into the Load Event on the form (an "If" statement that asks to hide the tab based on the combo box) but that doesn't seem to work. Is what I want to happen possible?

    Thank you in advance

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Can you provide a sample database for examination?

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    In order for this sort of formatting to be Record-appropriate, when moving from Record to Record, the code used to set the formatting needs to be in the Form_Current event, as well as in the AfterUpdate event of the Combobox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    weghjiu is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Apr 2014
    Posts
    2
    That worked, I needed to add it to the Form_Current event. Thanks!

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Welcome to the forum!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  2. Button For "Edit Mode"
    By jaarons in forum Programming
    Replies: 4
    Last Post: 01-25-2013, 09:58 AM
  3. Write "Edit List Items.." data back to original form.
    By ngahm in forum Database Design
    Replies: 33
    Last Post: 02-27-2012, 06:54 PM
  4. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  5. Replies: 3
    Last Post: 03-07-2011, 08:37 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