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
|
|||
|
|||
stLinkCriteria Syntax
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 & "' & "'" |
#2
|
|||
|
|||
stLinkCriteria Syntax
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" wrote in message ... 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 & "' & "'" |
#3
|
|||
|
|||
stLinkCriteria Syntax
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" wrote in message ... 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 & "' & "'" |
#4
|
|||
|
|||
stLinkCriteria Syntax
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 & "' & "'" |
Thread Tools | |
Display Modes | |
|
|