D
Doctor
From one form button, I want to open to a another form on a specific tab.
I've tried to figure this out, but to no avail.
In form RegionalCompetitions, I have a button that I want the user to click
to open another form called ChurchInformation. ChurchInformation has 6 tabs.
I am trying to use OpenArgs, but I just can't seem to get it right.
Here is what I have for the button in RegionalCompetitions:
Private Sub Contact1_Click()
On Error GoTo Err_Contact1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contacts"
stLinkCriteria = "[ContactID]=" & Me![RHostContact]
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "2" !!!!!!The "2"
(two) is supposed to be for the value that I want to send to the
ChurchInformation form because I want to open the third tab!!!!!!!!
Exit_Contact1_Click:
Exit Sub
Err_Contact1_Click:
MsgBox Err.Description
Resume Exit_Contact1_Click
End Sub
As far as the code for the ChurchInformation form, I have tried so many
variations and none have worked. so it is pointless to post that here.
Even more, I don't know which property I should put the code in? The OnOpen
or OnLoad?
I think what this all boils down to is that I have no understanding of the
OpenArg's principles. However, I have even tried to code in for the
ChurchInformation form to always open to the third tab and I was even
unsuccessful at that.
Please Help!
Thanks in advance.
I've tried to figure this out, but to no avail.
In form RegionalCompetitions, I have a button that I want the user to click
to open another form called ChurchInformation. ChurchInformation has 6 tabs.
I am trying to use OpenArgs, but I just can't seem to get it right.
Here is what I have for the button in RegionalCompetitions:
Private Sub Contact1_Click()
On Error GoTo Err_Contact1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contacts"
stLinkCriteria = "[ContactID]=" & Me![RHostContact]
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "2" !!!!!!The "2"
(two) is supposed to be for the value that I want to send to the
ChurchInformation form because I want to open the third tab!!!!!!!!
Exit_Contact1_Click:
Exit Sub
Err_Contact1_Click:
MsgBox Err.Description
Resume Exit_Contact1_Click
End Sub
As far as the code for the ChurchInformation form, I have tried so many
variations and none have worked. so it is pointless to post that here.
Even more, I don't know which property I should put the code in? The OnOpen
or OnLoad?
I think what this all boils down to is that I have no understanding of the
OpenArg's principles. However, I have even tried to code in for the
ChurchInformation form to always open to the third tab and I was even
unsuccessful at that.
Please Help!
Thanks in advance.