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
|
|||
|
|||
Opening a form and setting filter
This is an easy one for those who know!!!
I want to open a form and set a filter. I have the following line as code: DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[Salesby ProductDetailedForm]![ProductCode] = " & Me![ProductCode] the problem is that the end of the statement Me![ProductCode] needs to be enclosed in quotes to work properly. how does this line need to be modified? Thank you |
#2
|
|||
|
|||
Opening a form and setting filter
DoCmd.OpenForm "SalesbyProductDetailedForm", , ,
"[SalesbyProductDetailedForm]![ProductCode] = '" & Me![ProductCode] & "'" Notice the single-quote (apostrophe) before the first double-quote and between the last pair of double-quotes. Single-quotes are enough to enclose the string expression in your Where Condition statement. Paul Johnson Alexandria, VA "Smiller" wrote in message ... This is an easy one for those who know!!! I want to open a form and set a filter. I have the following line as code: DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[Salesby ProductDetailedForm]![ProductCode] = " & Me![ProductCode] the problem is that the end of the statement Me![ProductCode] needs to be enclosed in quotes to work properly. how does this line need to be modified? Thank you |
#3
|
|||
|
|||
Opening a form and setting filter
That is so close...but I'm getting an extra apace before
the Me![ProductCode] value. How do I get rid of it? Thanks -----Original Message----- DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[SalesbyProductDetailedForm]![ProductCode] = '" & Me! [ProductCode] & "'" Notice the single-quote (apostrophe) before the first double-quote and between the last pair of double-quotes. Single-quotes are enough to enclose the string expression in your Where Condition statement. Paul Johnson Alexandria, VA "Smiller" wrote in message ... This is an easy one for those who know!!! I want to open a form and set a filter. I have the following line as code: DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[Salesby ProductDetailedForm]![ProductCode] = " & Me! [ProductCode] the problem is that the end of the statement Me![ProductCode] needs to be enclosed in quotes to work properly. how does this line need to be modified? Thank you . |
#4
|
|||
|
|||
Opening a form and setting filter
GOT IT THANK YOU!!!
-----Original Message----- That is so close...but I'm getting an extra apace before the Me![ProductCode] value. How do I get rid of it? Thanks -----Original Message----- DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[SalesbyProductDetailedForm]![ProductCode] = '" & Me! [ProductCode] & "'" Notice the single-quote (apostrophe) before the first double-quote and between the last pair of double-quotes. Single-quotes are enough to enclose the string expression in your Where Condition statement. Paul Johnson Alexandria, VA "Smiller" wrote in message .. . This is an easy one for those who know!!! I want to open a form and set a filter. I have the following line as code: DoCmd.OpenForm "SalesbyProductDetailedForm", , , "[Salesb y ProductDetailedForm]![ProductCode] = " & Me! [ProductCode] the problem is that the end of the statement Me![ProductCode] needs to be enclosed in quotes to work properly. how does this line need to be modified? Thank you . . |
Thread Tools | |
Display Modes | |
|
|