Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115

    I agree, would you please show us a screen shot of your form with the two tabs and explain what should happen. For the Where condition to work you need to have a field called "ID" in the record source of the form being called and a control called ID in the calling form (the "Me.ID" part). If both are true (and both are numeric) then the (main) form will open at the record with the right ID. Now, if you have subforms on the tab pages and those are not linked to the main form via the ID field you would get what I think you're explaining. Depending on your subforms (single form vs continuous or datasheet) you will have to add lines of code to go to the desired record in the subform. But we can't really help much without seeing what you have....
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  2. #17
    Miki52 is offline Novice
    Windows 11 Access 2021
    Join Date
    Jan 2024
    Posts
    11
    Quote Originally Posted by Welshgasman View Post
    Well if you have subforms on each tab it will not. The Where is for the Mainform?
    Likely need to issue a FindFirst of the recordsetclone for your tab control subform. Or perhaps just setfocus to the subform control if they are linked by Parent & Child.
    Sorry, but I'm having a hard time following you.
    The "button" is in a mask 1 with a text box named ID.
    In a mask 2 is inserted a tab control with n 2 tabs.
    In tab #2 is inserted a text box with name ID .
    I would like with the button to open tab #2 of mask #2 and associate the ID of this tab with the ID of Mask 1.
    I hope I have been clearer.

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Why do you call a form a mask?
    What is the recorsource for Tab2?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #19
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Does the record source for mask 2 have a field called ID with the value from the text box named ID in mask1? What you describe in post 17 should work with the code we discussed. Or do you want to create a new record in mask 2 for the ID from mask 1? Either way a screenshot would help.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #20
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    @Welshgasman Mask=Form in italian (masquera). If you set the Windows language to Italian even the VBA changes from Forms!... to Masquera!
    And Google translates that into Mask in English.
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #21
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Mask=Form in italian
    I was wondering that myself. Thought it could be a form but wasn't sure. I was worried it was something I'd never heard of before.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  7. #22
    Miki52 is offline Novice
    Windows 11 Access 2021
    Join Date
    Jan 2024
    Posts
    11
    I think the translation certainly does not help understanding.
    I decided to modify the structure of the Form, eliminating the tab control.
    Thanks for the help.
    I ask the organizers to close this thread

  8. #23
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by Miki52 View Post
    I think the translation certainly does not help understanding.
    I decided to modify the structure of the Form, eliminating the tab control.
    Thanks for the help.
    I ask the organizers to close this thread
    That is for you to do, in Thread Tools, in green bar, top of page
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Button to create/open or copy/open an excel file
    By petrikos in forum Programming
    Replies: 23
    Last Post: 10-15-2021, 07:00 AM
  2. Replies: 4
    Last Post: 11-24-2020, 03:41 PM
  3. Replies: 1
    Last Post: 02-14-2016, 10:18 AM
  4. Replies: 5
    Last Post: 10-13-2015, 02:53 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