M
Mary A Perez
The user chooses the Contract Name and the Contract Rate Sheet Name from
cmbContractName and cmbContractRateSheetName respectfully. Once these names
are chosen, the user clicks the command button that should take them directly
to the record they have chosen based on the Contract Name and the Contract
Rate Sheet Name from frmContractRates-Specifications.
However, it filters a blank record from frmContractRates-Specifications.
Currently the record source for the frmContractRates-Specificaions is
tblContractRates-Specifications. Should I develop a query Vs the table to
make the code work? As you can tell my knowledge is very limited.
Below is the code for "on click" event procedure. Below that is the
"DeBug" info I'm receiving.
Thanks for your patience and help.
Private Sub cmdClickforContractInformation1_Click()
On Error GoTo Err_cmdClickforContractInformation1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[ContractName]=""" & cmbContractName _
& """ And [ContractRateSheetName] = """ _
& cmbContractRateSheetName & """"
Debug.Print stLinkCriteria
stDocName = "frmContractRates-Specifications"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation1_Cli:
Exit Sub
Err_cmdClickforContractInformation1_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation1_Cli
End Sub
Debug Info:
[ContractName]="34" And [ContractRateSheetName] = "109"
cmbContractName and cmbContractRateSheetName respectfully. Once these names
are chosen, the user clicks the command button that should take them directly
to the record they have chosen based on the Contract Name and the Contract
Rate Sheet Name from frmContractRates-Specifications.
However, it filters a blank record from frmContractRates-Specifications.
Currently the record source for the frmContractRates-Specificaions is
tblContractRates-Specifications. Should I develop a query Vs the table to
make the code work? As you can tell my knowledge is very limited.
Below is the code for "on click" event procedure. Below that is the
"DeBug" info I'm receiving.
Thanks for your patience and help.
Private Sub cmdClickforContractInformation1_Click()
On Error GoTo Err_cmdClickforContractInformation1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[ContractName]=""" & cmbContractName _
& """ And [ContractRateSheetName] = """ _
& cmbContractRateSheetName & """"
Debug.Print stLinkCriteria
stDocName = "frmContractRates-Specifications"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdClickforContractInformation1_Cli:
Exit Sub
Err_cmdClickforContractInformation1_Click:
MsgBox Err.Description
Resume Exit_cmdClickforContractInformation1_Cli
End Sub
Debug Info:
[ContractName]="34" And [ContractRateSheetName] = "109"