Open form with selected customer only

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

The code below should open the form BlankChecks from the form
frmAutoPayrolReport
and show only the customer selected from the Combo187 list.
It does not work, why?
Customers is the Control Source (Field) on the form BlankChecks
Combo187 is a unbound list of Employees, get source from table (tblchecks)
Field Customers


Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, , , [Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]
Me![Combo187] = Null
Exit_Command167_Click:
Exit Sub

Err_Command167_Click:
MsgBox Err.Description
Resume Exit_Command167_Click
 
The code below should open the form BlankChecks from the form
frmAutoPayrolReport
and show only the customer selected from the Combo187 list.
It does not work, why?
Customers is the Control Source (Field) on the form BlankChecks
Combo187 is a unbound list of Employees, get source from table (tblchecks)
Field Customers


Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, , , [Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]
Me![Combo187] = Null
Exit_Command167_Click:
Exit Sub

Err_Command167_Click:
MsgBox Err.Description
Resume Exit_Command167_Click

See my response to previous post:
"Open Form showing Selected Vendor only"

- Jim
 
Back
Top