Open form with selected customer only

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
 
J

Jim Allensworth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top