If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form to open report based on several combo boxes
I need to open a report based on three conditions. Contractor, Card, and
Statement, which is provided from combo boxes. I am able to to open the report based on the Contractor combo box, I'm just not sure how to incorporate the other two and have them all work together. Here is what I am using to pull from the contractor combo box. How can I add the other two to make it all work? Any help is greatly appreicated! Dim StrWhere As String StrWhere = "[Contractor] = """ & Me.Contractor & """" DoCmd.OpenReport "coding", acViewPreview, , StrWhere |
#2
|
|||
|
|||
Form to open report based on several combo boxes
This assumes that they are all text data types;
StrWhere = "[Contractor] = """ & Me.Contractor & """ And [Card]= """ _ & Me.Card & """ And [Statement]= """ & Me.Statement & """" -- _________ Sean Bailey "Momof2" wrote: I need to open a report based on three conditions. Contractor, Card, and Statement, which is provided from combo boxes. I am able to to open the report based on the Contractor combo box, I'm just not sure how to incorporate the other two and have them all work together. Here is what I am using to pull from the contractor combo box. How can I add the other two to make it all work? Any help is greatly appreicated! Dim StrWhere As String StrWhere = "[Contractor] = """ & Me.Contractor & """" DoCmd.OpenReport "coding", acViewPreview, , StrWhere |
#3
|
|||
|
|||
Form to open report based on several combo boxes
I changed it to that now when I go to run it, I get a debug error and the
following comes back highlighted in yellow. Can you help with what is wrong with this part? DoCmd.OpenReport "coding", acViewPreview, , StrWhere "Beetle" wrote: This assumes that they are all text data types; StrWhere = "[Contractor] = """ & Me.Contractor & """ And [Card]= """ _ & Me.Card & """ And [Statement]= """ & Me.Statement & """" -- _________ Sean Bailey "Momof2" wrote: I need to open a report based on three conditions. Contractor, Card, and Statement, which is provided from combo boxes. I am able to to open the report based on the Contractor combo box, I'm just not sure how to incorporate the other two and have them all work together. Here is what I am using to pull from the contractor combo box. How can I add the other two to make it all work? Any help is greatly appreicated! Dim StrWhere As String StrWhere = "[Contractor] = """ & Me.Contractor & """" DoCmd.OpenReport "coding", acViewPreview, , StrWhere |
#4
|
|||
|
|||
Form to open report based on several combo boxes
Are [Contractor], [Card] and [Statement] all text data types, and are
they the bound columns in their respective combo boxes? -- _________ Sean Bailey "Momof2" wrote: I changed it to that now when I go to run it, I get a debug error and the following comes back highlighted in yellow. Can you help with what is wrong with this part? DoCmd.OpenReport "coding", acViewPreview, , StrWhere "Beetle" wrote: This assumes that they are all text data types; StrWhere = "[Contractor] = """ & Me.Contractor & """ And [Card]= """ _ & Me.Card & """ And [Statement]= """ & Me.Statement & """" -- _________ Sean Bailey "Momof2" wrote: I need to open a report based on three conditions. Contractor, Card, and Statement, which is provided from combo boxes. I am able to to open the report based on the Contractor combo box, I'm just not sure how to incorporate the other two and have them all work together. Here is what I am using to pull from the contractor combo box. How can I add the other two to make it all work? Any help is greatly appreicated! Dim StrWhere As String StrWhere = "[Contractor] = """ & Me.Contractor & """" DoCmd.OpenReport "coding", acViewPreview, , StrWhere |
#5
|
|||
|
|||
Form to open report based on several combo boxes
yes I believe they are
"Beetle" wrote: Are [Contractor], [Card] and [Statement] all text data types, and are they the bound columns in their respective combo boxes? -- _________ Sean Bailey "Momof2" wrote: I changed it to that now when I go to run it, I get a debug error and the following comes back highlighted in yellow. Can you help with what is wrong with this part? DoCmd.OpenReport "coding", acViewPreview, , StrWhere "Beetle" wrote: This assumes that they are all text data types; StrWhere = "[Contractor] = """ & Me.Contractor & """ And [Card]= """ _ & Me.Card & """ And [Statement]= """ & Me.Statement & """" -- _________ Sean Bailey "Momof2" wrote: I need to open a report based on three conditions. Contractor, Card, and Statement, which is provided from combo boxes. I am able to to open the report based on the Contractor combo box, I'm just not sure how to incorporate the other two and have them all work together. Here is what I am using to pull from the contractor combo box. How can I add the other two to make it all work? Any help is greatly appreicated! Dim StrWhere As String StrWhere = "[Contractor] = """ & Me.Contractor & """" DoCmd.OpenReport "coding", acViewPreview, , StrWhere |
Thread Tools | |
Display Modes | |
|
|