Re: Report on a selected field value
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Tue, 14 Nov 2006 09:23:27 -0600
It's good to hear that it's working.
One way to figure out which quotes are where is to click in
their area and use the right and left arrow keys to move
through them one character at a time.
As I kind of implied earlier, I personally prefer the syntax
that you chose to use for the same reason. The only way
that could cause a problem is if the value in EIIList
contained a double quote character, which should be extemely
unlikely.
--
Marsh
MVP [MS Access]
Aaron wrote:
Marshall Barton wrote:
When you post code with a question, please use Copy/Paste so
we don't waste time chasing typos.
You have some errors in the posted code. First, the quotes
are wrong. If EII_Acronym is a text field, it should be:
strWhere = "[EII_Acronym] = '" & EIIList & "' "
or if EII_Acronym might possible contain an apostrophe, use:
strWhere = "[EII_Acronym] = """ & EIIList & """ "
Bingo! This one did it. The one before probably would work, but I
couldn't figure out where the apostrophes and quotes began and ended...
I hope the second one won't cause errors.
Thank you thank you thank you!
If EII_Acronym is a mumeric type field, use:
strWhere = "[EII_Acronym] = " & EIIList
The other error I spotted is the wrong number of commas in
the OpenReport line:
DoCmd.OpenReport "EII_Report", acViewPreview, , strWhere
.
- References:
- Report on a selected field value
- From: Aaron
- Re: Report on a selected field value
- From: Marshall Barton
- Re: Report on a selected field value
- From: Aaron
- Re: Report on a selected field value
- From: Marshall Barton
- Re: Report on a selected field value
- From: Aaron
- Report on a selected field value
- Prev by Date: Re: Report on a selected field value
- Next by Date: Re: Not Suming Duplicates
- Previous by thread: Re: Report on a selected field value
- Next by thread: Re: Report Formatting
- Index(es):
Relevant Pages
|