From: Brian J on
I am unable to get my syntax working for my four criteria. Can anyone
suggest what is wrong?
stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _
And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _
And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _
And [DivisionCode] = '" & Me.Text221 & "' & "'"
From: Douglas J. Steele on
The line continuation characters cannot be inside the quotes.

stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' " & _
"And [UHC_DEPT_NUM] = '" & Me.Text217 & "' " & _
"And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' " & _
"And [DivisionCode] = '" & Me.Text221 & "'"


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Brian J" <BrianJ(a)discussions.microsoft.com> wrote in message
news:FB857712-BE91-4C96-A8EE-B28AC6401373(a)microsoft.com...
>I am unable to get my syntax working for my four criteria. Can anyone
> suggest what is wrong?
> stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _
> And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _
> And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _
> And [DivisionCode] = '" & Me.Text221 & "' & "'"


From: Jeff Boyce on
Brian

It might help to know what happens ... what do you mean by "get [it]
working"?

By the way, if your [FiscalYearInd] is stored as a numeric data type, you
wouldn't use the single quote (that's reserved for delimiting text type
data).

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Brian J" <BrianJ(a)discussions.microsoft.com> wrote in message
news:FB857712-BE91-4C96-A8EE-B28AC6401373(a)microsoft.com...
>I am unable to get my syntax working for my four criteria. Can anyone
> suggest what is wrong?
> stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _
> And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _
> And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _
> And [DivisionCode] = '" & Me.Text221 & "' & "'"


From: Daryl S on
Brian -

Try this - only adjusted the last quotes:

stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _
And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _
And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _
And [DivisionCode] = '" & Me.Text221 & "'"

--
Daryl S


"Brian J" wrote:

> I am unable to get my syntax working for my four criteria. Can anyone
> suggest what is wrong?
> stLinkCriteria = "[FiscalYearInd] = '" & Me.lstFiscalYear & "' _
> And [UHC_DEPT_NUM] = '" & Me.Text217 & "' _
> And [PROV_UHC_CAT_NUM] = '" & Me.Text219 & "' _
> And [DivisionCode] = '" & Me.Text221 & "' & "'"
 | 
Pages: 1
Prev: Table Help
Next: subform problems