Re: Dlookup function criteria w/wo single quotes
- From: Doug F. <DougF@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Sep 2007 16:28:02 -0700
Yes, Pamphlet is a text field. Do I use single or double quotes?
When I use single quotes it works fine but I get into trouble because
one of the pamphlets has a single quote (') in its description.
I remember an example in these postings of double quote (")
and I recall """ ie 3 (") but can't find the post now.
How would the criteria look? "[Pamphlet] = """ & Forms!...?
And yes it was the same database in both cases.
With their permission I take a copy of the database from their
site to my laptop.
Thanks,
Doug
"Douglas J. Steele" wrote:
Assuming Pamphlet is a text field, the quotes are necessary..
It's been that way in all versions of Access. I can't understand why it
would work on one machine and not the other, assuming you're talking about
the same database in both cases.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Doug F." <DougF@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CA656D48-37B8-474B-8936-A296EA53A409@xxxxxxxxxxxxxxxx
I have Dlookup:
That WORKS:(this has single quotes around the criteria)
myRequireItemNo = DLookup("[RequireItemNo]", "V$Pamphlets", "[Pamphlet] =
'"
& Forms![#10 Pamphlets]![subform #10B PamphletOrdersDetails]!Combo7 & "'")
'
That FAILS:(this has no single quotes around criteria)
myRequireItemNo = DLookup("[RequireItemNo]", "V$Pamphlets", "[Pamphlet] =
"
& Forms![#10 Pamphlets]![subform #10B PamphletOrdersDetails]!Combo7)
A client site runs the FAILS version ok with MS Access 2003 11.6566.8132,
when I
run it on my machine MS Access 11.5614.5606 it fails, sorry I don't have
the
msg
at this moment. Thoughts?
Thanks,
Doug
- References:
- Re: Dlookup function criteria w/wo single quotes
- From: Douglas J. Steele
- Re: Dlookup function criteria w/wo single quotes
- Prev by Date: Re: Dlookup function criteria w/wo single quotes
- Next by Date: RE: Syntax error in date in query expression '##'
- Previous by thread: Re: Dlookup function criteria w/wo single quotes
- Next by thread: RE: Syntax error in date in query expression '##'
- Index(es):
Relevant Pages
|