I have a form with a combobox using the following query:
The bound column is column 1
When you run this you are asked for the value for parameter "acct". If you input a jobnumber, the proper form/record is presented. I would like to eliminate having to input the parameter value again since the wanted record was selected in the combobox.
Thanks
Code:
SELECT JobNumber,
CustomerName,
[PO],
[Customer Motor #],
assm_status
FROM tblJob
WHERE assm_status<>"Done"
ORDER BY CustomerName;
Code:
Private Sub CustomerSearch_AfterUpdate()
On Error GoTo Err_customersearch_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim acct As Integer
acct = Me.CustomerSearch.Value
stDocName = "frmOESJOBmaint"
DoCmd.OpenForm stDocName, , , "[jobnumber] = acct"
Exit_customersearch_Click:
Exit Sub
Err_customersearch_Click:
MsgBox Err.Description
Resume Exit_customersearch_Click
End Sub
Thanks
Comment