I have an option group fraFormSelection with 3 options. The value for these options is 1,2,3. I am trying to write code that will select a form based upon the selection of the option group, placing the form name in the string strFormName for later use (to open the form with filtered records based on selections in other option groups - code I will write later).
When I click the button to select records I get the message:
"The action or method requires a Form Name argument"
This is my code:
Dim strFormName As String
Dim strLinkCriteria As String
If Me!fraFormSelect = 1 Then
strFormName = "frmProjectsSA&Zoning"
ElseIf Me!fraFormSelect = 2 Then
stFormName = "frmProjectsAE"
ElseIf Me!fraFormSelect = 3 Then
stFormName = "frmProjectsPaypoint"
Else
MsgBox "Please select a form", vbExclamation, "Open Form"
End If
DoCmd.OpenForm strDocName, , , strLinkCriteria
Signed,
Punderfully confused yet trying
When I click the button to select records I get the message:
"The action or method requires a Form Name argument"
This is my code:
Dim strFormName As String
Dim strLinkCriteria As String
If Me!fraFormSelect = 1 Then
strFormName = "frmProjectsSA&Zoning"
ElseIf Me!fraFormSelect = 2 Then
stFormName = "frmProjectsAE"
ElseIf Me!fraFormSelect = 3 Then
stFormName = "frmProjectsPaypoint"
Else
MsgBox "Please select a form", vbExclamation, "Open Form"
End If
DoCmd.OpenForm strDocName, , , strLinkCriteria
Signed,
Punderfully confused yet trying