M
Mary A Perez
My command button developed on my choice form with the wizard is working when
a plan and product choice is given. However, I added code to also narrow the
user's choice for form view an effective date. (This is a database that will
hold contract information & the contracts are identified by plan, product &
effective date.)
The following is my code. The only thing I can think of as to why it's not
working is that "cmbEffectiveDate" control has no query or row source. But I
don't have a table specifically for the effective dates. The effective dates
are only in the table that is linked to form that is opening.
Thanks in advance 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] & " AND
[EffectiveDate]=" & "#" & Me![cmbEffectiveDate] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation_Clic:
Exit Sub
Err_cmdClickforContractInformation_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation_Clic
End Sub
a plan and product choice is given. However, I added code to also narrow the
user's choice for form view an effective date. (This is a database that will
hold contract information & the contracts are identified by plan, product &
effective date.)
The following is my code. The only thing I can think of as to why it's not
working is that "cmbEffectiveDate" control has no query or row source. But I
don't have a table specifically for the effective dates. The effective dates
are only in the table that is linked to form that is opening.
Thanks in advance 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] & " AND
[EffectiveDate]=" & "#" & Me![cmbEffectiveDate] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation_Clic:
Exit Sub
Err_cmdClickforContractInformation_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation_Clic
End Sub