M
Mary A Perez
The following code was built with the command wizard & works great, however,
I need to add addtional code to filter with more content. Currently, when
the command button is clicked, it opens the form based on the Plan and
Product chosen. The user will also have to choose the location, effective
and term dates as well to drill down to the form they wish to view. How do I
add code to include these items so when the user clicks the command button,
not only will the form open to the correct plan and product, but to the
matching location, effective and term dates as well.
Thank you for your help.
Private Sub cmdClickforContractInformation_Click()
On Error GoTo Err_cmdClickforContractInformation_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContractRates-Specifications"
stLinkCriteria = "[ProductId]=" & Me![cmbProduct]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation_Clic:
Exit Sub
Err_cmdClickforContractInformation_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation_Clic
End Sub
I need to add addtional code to filter with more content. Currently, when
the command button is clicked, it opens the form based on the Plan and
Product chosen. The user will also have to choose the location, effective
and term dates as well to drill down to the form they wish to view. How do I
add code to include these items so when the user clicks the command button,
not only will the form open to the correct plan and product, but to the
matching location, effective and term dates as well.
Thank you for your help.
Private Sub cmdClickforContractInformation_Click()
On Error GoTo Err_cmdClickforContractInformation_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContractRates-Specifications"
stLinkCriteria = "[ProductId]=" & Me![cmbProduct]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation_Clic:
Exit Sub
Err_cmdClickforContractInformation_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation_Clic
End Sub