Results 1 to 8 of 8
  1. #1
    bfont is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2015
    Posts
    5

    Moving Between Tab Controls

    I have a form with 2 tab controls on it. I want the user to be able to fill out a portion of tab 1, then switch to tab 2, then back to tab 1 to complete the remaining fields. My issue is that I have some required controls on tab 1 so that when the user moves to tab 2, an error message is displayed saying that there are required controls on tab 1 that are blank. Is there a way to move between tabs without Access checking for blank required controls when moving between tab controls? I have added error checking on the form before update event but it still checks for blank required controls when changing tab controls.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You have two tab controls or one tab control with two tab pages?

    These are forms on tabs? If fields are set as required in table, then leaving form will commit record and if fields are not filled in, cause error. No way around that expect to not set this in table. Also triggers BeforeUpdate event. Don't think I've ever needed to use form BeforeUpdate event.
    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.

  3. #3
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,369
    What events are you using? Form BeforeUpdate should not fire until an attempt to leave the record is executed, and moving between tab controls on the same form does not fire that event. Maybe one tab is on one form and the other is on a subform? That would be different.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I agree, if no subforms are involved, should not be any issue but since there is an issue, must be moving from main form or subform to a(nother) subform.
    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.

  5. #5
    bfont is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2015
    Posts
    5
    Oh, yes I guess I do have 1 tab control with 2 tab pages and the form on tab 2 is a subform. I didn't set the fields as required in the table, but evidently as Micron pointed out, I am moving from the Main form to a subform. Guess I'll have to try something different. Thank you both for your help, much appreciated.

  6. #6
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,369
    The whole idea of putting forms in tab control pages is so you don't have to use a subform control so why have a subform control on a page? If you mean this 'subform' is just a form that you put on a page and you use it as a subform somewhere else, then when on the page it's not a subform. If it is a form in a subform control on a page, then you should be able to delete the sf control and just put the form on the page, I would think.

    And yes, when you move from one form to the other, you are causing the 1st bound form to update.
    Last edited by Micron; 03-23-2022 at 09:08 AM. Reason: added comment
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    @Micron, I am not sure what you are trying to convey. A form placed on a tab control page HAS to be within a subform container control. It's no different than placing subform directly on main form.

    The idea of putting forms on tab control is to conserve screen space, not to eliminate subform container control.
    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.

  8. #8
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,369
    The idea of putting forms on tab control is to conserve screen space, not to eliminate subform container control.
    I know that - didn't say otherwise.
    Guess I forgot the rest; been a while since I put forms on pages as apposed to controls on pages.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-29-2017, 12:09 PM
  2. Moving records
    By JeRz in forum Access
    Replies: 1
    Last Post: 07-31-2014, 08:07 AM
  3. NOOB - moving controls in design view
    By brettnolan in forum Access
    Replies: 4
    Last Post: 04-24-2014, 05:37 PM
  4. Moving a record.
    By Cutter596 in forum Queries
    Replies: 1
    Last Post: 08-02-2011, 02:49 PM
  5. Moving from vs 07 to vs 97
    By Kilroy2.0 in forum Access
    Replies: 4
    Last Post: 06-04-2010, 08:42 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