Open Form Tab (1 Viewer)

cktcPeterson

Member
Local time
Yesterday, 23:34
Joined
Mar 23, 2022
Messages
73
I have a button to open a form. I want the form to open to a specific tab

I copied this from my macro that opens perfectly.

Form: frmApproveApplication1
View: Form
Where: "[Requested Course.ID]=" & [ID]
Mode: Dialog

I want it to open to tab 2,
Tab name: tbApproveCourse

Thanks for any guidance in this.
 

tvanstiphout

Active member
Local time
Today, 00:34
Joined
Jan 22, 2016
Messages
222
I would use OpenArgs argument of DoCmd.OpenForm for that.

You may want to read up on how the NW2 team implemented OpenArgs processing in the Northwind 2 Dev Edition template:
(string functions at 35:30)
 

Attachments

  • 1695844676004.png
    1695844676004.png
    6.9 KB · Views: 51

Mike Krailo

Well-known member
Local time
Today, 03:34
Joined
Mar 28, 2020
Messages
1,044
In the OnLoad event:


Code:
Private Sub Form_Load()
    Me!frmApproveApplication1.Pages("tbApproveCourse").SetFocus
End Sub
 

Users who are viewing this thread

Top Bottom