I am using a combobox lookup on one form and would like to use the value returned from that lookup to display a record on another form. Here is the select statement:
SELECT tblJob.JobNumbe r, tblJob.Customer Name, tblJob.PO, tblJob.[Customer Motor #], tblJob.assm_sta tus FROM tblJob WHERE (((tblJob.assm_ status)<>"Done" )) ORDER BY tblJob.Customer Name;
Column 1 is the bound column
Here is the after update code
Private Sub CustomerSearch_ AfterUpdate()
On Error GoTo Err_customersea rch_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim acct As Integer
acct = Me.CustomerSear ch.Value
stDocName = "frmOESJOBmaint "
DoCmd.OpenForm stDocName, , , "[jobnumber] = acct"
Exit_customerse arch_Click:
Exit Sub
Err_customersea rch_Click:
MsgBox Err.Description
Resume Exit_customerse arch_Click
End Sub
When I run it asks for the parameter value of "acct" and if I key the jobnumber in it will display the proper form and record. Please help me understand what is wrong.
Thanks
SELECT tblJob.JobNumbe r, tblJob.Customer Name, tblJob.PO, tblJob.[Customer Motor #], tblJob.assm_sta tus FROM tblJob WHERE (((tblJob.assm_ status)<>"Done" )) ORDER BY tblJob.Customer Name;
Column 1 is the bound column
Here is the after update code
Private Sub CustomerSearch_ AfterUpdate()
On Error GoTo Err_customersea rch_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim acct As Integer
acct = Me.CustomerSear ch.Value
stDocName = "frmOESJOBmaint "
DoCmd.OpenForm stDocName, , , "[jobnumber] = acct"
Exit_customerse arch_Click:
Exit Sub
Err_customersea rch_Click:
MsgBox Err.Description
Resume Exit_customerse arch_Click
End Sub
When I run it asks for the parameter value of "acct" and if I key the jobnumber in it will display the proper form and record. Please help me understand what is wrong.
Thanks
Comment