Open form showing Selected Customer ONLY

D

Dave Elliott

Below is my code to open the form BlankChecks via the form
frmAutoPayrollReport
There is a drop down list on the form frmAutoPayrollReport wher the criteria
for the Customer comes from,
named Combo187 then there is a on click command button which I use to use
the code below.
It does not work... why ?

Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_Command189_Click

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, "", "[Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]"

Exit_Command189_Click:
Exit Sub

Err_Command189_Click:
MsgBox Err.Description
Resume Exit_Command189_Click
 
J

Jim Allensworth

Below is my code to open the form BlankChecks via the form
frmAutoPayrollReport
There is a drop down list on the form frmAutoPayrollReport wher the criteria
for the Customer comes from,
named Combo187 then there is a on click command button which I use to use
the code below.
It does not work... why ?

Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_Command189_Click

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, "", "[Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]"

Exit_Command189_Click:
Exit Sub

Err_Command189_Click:
MsgBox Err.Description
Resume Exit_Command189_Click

Geez, Dave. How many times do you have to keep starting a new thread
for the same question. I posted a response 2 questions ago. If that
doesn't work then post back with the results.

- Jim
 
D

Dave Elliott

This is a different problem altogether, if I missed the answer, I
apologize! Didnt see answer to previous one either.
Thanks,
I deleted old responses because it was getting to confusing scrolling down.

Jim Allensworth said:
Below is my code to open the form BlankChecks via the form
frmAutoPayrollReport
There is a drop down list on the form frmAutoPayrollReport wher the criteria
for the Customer comes from,
named Combo187 then there is a on click command button which I use to use
the code below.
It does not work... why ?

Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_Command189_Click

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, "", "[Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]"

Exit_Command189_Click:
Exit Sub

Err_Command189_Click:
MsgBox Err.Description
Resume Exit_Command189_Click

Geez, Dave. How many times do you have to keep starting a new thread
for the same question. I posted a response 2 questions ago. If that
doesn't work then post back with the results.

- Jim
 
R

Reggie

Dave, Like Jim stated please continue the same thread instead of giving it
a different title. This seems like the same problem to me only worded
differently. And try not deleting old responses until you are satisfied
cause normally some in here will have an answer to your problem eventually
and everyone here does this on there spare time for free and would hate to
think they're just writing detailed solution, running test, and posting
results to someone whom might not even be there anymore. And when you say
thanks to everyone for helping and don't ask anymore question, we assume
your problem is solved. Anyway enough rambling from me. Here's what I
posted to your first thread and it seems to fit this one(all of them) as
well. You can cut & paste the appropriate one and paste directly into your
code so as not to miss any punctuation. Good luck.

'number field do this:
DoCmd.OpenForm "BlankChecks", , , "[Customers] = " & Me.Combo187

'text field do this:
DoCmd.OpenForm "BlankChecks", , , "[Customers] = '" & Me.Combo187 & "'"

--
Reggie

----------
Dave Elliott said:
This is a different problem altogether, if I missed the answer, I
apologize! Didnt see answer to previous one either.
Thanks,
I deleted old responses because it was getting to confusing scrolling down.

Jim Allensworth said:
Below is my code to open the form BlankChecks via the form
frmAutoPayrollReport
There is a drop down list on the form frmAutoPayrollReport wher the criteria
for the Customer comes from,
named Combo187 then there is a on click command button which I use to use
the code below.
It does not work... why ?

Dte1 = Forms!frmAutoPayrollReport!BeginDate
Dte2 = Forms!frmAutoPayrollReport!EndDate
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_Command189_Click

stDocName = "BlankChecks"
DoCmd.OpenForm stDocName, "", "[Customers] =
[Forms]![frmAutoPayrollReport]![Combo187]"

Exit_Command189_Click:
Exit Sub

Err_Command189_Click:
MsgBox Err.Description
Resume Exit_Command189_Click

Geez, Dave. How many times do you have to keep starting a new thread
for the same question. I posted a response 2 questions ago. If that
doesn't work then post back with the results.

- 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