D
Dave
I have a form named frmAutoPayrollReport which has a combo box on it used
to select a Customer from
The Combo box is Named Combo187
I also have a form named BlankChecks that has as it's record source a table
name tblchecks.(with a field in it named customers)
The idea is too make the form BlankChecks open and show what choice I pick
from the form frmAutoPayrollReport (Combo187) List.
The Combo187 uses as it's record source a table named Customers with the
control customers.
Whereas the form BlankChecks uses as it's record source for the Customer
drop down list the table Employees, but it's control is Customers from the
table
tblchecks which has a customer field in it.
Here is my code I am trying, it does not work, opens the form, but does not
display a record.
The form BlankChecks normally opens to a new record.
Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_frmAutoPayrollReport_Click
Forms!frmAutoPayrollReport!Combo187 = Null
stDocName = "BlankChecks"
stLinkCriteria = "[tblchecks]=" & Me![Combo187]
DoCmd.OpenForm "BlankChecks", , , "[Customers] = '" & Me.Combo187 & "'"
Exit_frmAutoPayrollReport_Click:
Exit Sub
Err_frmAutoPayrollReport_Click:
MsgBox Err.Description
Resume Exit_frmAutoPayrollReport_Click
to select a Customer from
The Combo box is Named Combo187
I also have a form named BlankChecks that has as it's record source a table
name tblchecks.(with a field in it named customers)
The idea is too make the form BlankChecks open and show what choice I pick
from the form frmAutoPayrollReport (Combo187) List.
The Combo187 uses as it's record source a table named Customers with the
control customers.
Whereas the form BlankChecks uses as it's record source for the Customer
drop down list the table Employees, but it's control is Customers from the
table
tblchecks which has a customer field in it.
Here is my code I am trying, it does not work, opens the form, but does not
display a record.
The form BlankChecks normally opens to a new record.
Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_frmAutoPayrollReport_Click
Forms!frmAutoPayrollReport!Combo187 = Null
stDocName = "BlankChecks"
stLinkCriteria = "[tblchecks]=" & Me![Combo187]
DoCmd.OpenForm "BlankChecks", , , "[Customers] = '" & Me.Combo187 & "'"
Exit_frmAutoPayrollReport_Click:
Exit Sub
Err_frmAutoPayrollReport_Click:
MsgBox Err.Description
Resume Exit_frmAutoPayrollReport_Click