Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid use of vertical bars

Status
Not open for further replies.

Ebes1099

Technical User
Jul 8, 2009
156
US
I'm having a problem with an expression in a Query that was built by someone else.

I get an Invalid use of Vertical bars error when I try and run it.

The expression is,

Line1: IIf([CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[EXT_CLINIC_NO]>"!"|"Clinic # " & [CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[EXT_CLINIC_NO]|[CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[LOCATION_P_ADDR_LINE_TXT1]

I was thinking they should be commas, since they look like they are separating the arguments, but I get a syntax error if I just replace them with commas. Any help? Thanks.
 
Yes that was in there. Must have just missed it when I copied and pasted into that post.
 
I have had problems when I tried to link two queries when the linking fields had a | in them as a separator. I had something like str(FieldNumeric1) & "|" & str(FieldNumeric2) as the join value. I never figured out why it would not work. I just changed them from a | to an X and the join worked.

 
The entire expression after I replace the vertical bars with commas is. (I haven't tried replacing the "!" yet.

Line1: IIf([CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[EXT_CLINIC_NO]>"!","Clinic # " & [CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[EXT_CLINIC_NO],[CPN_PROD_DN_CAG_SUBCAG_LOC_RPT].[LOCATION_P_ADDR_LINE_TXT1])

I'm actually attempting to help a co-worker solve this and I don't have direct access to the back end database where this query is so it makes it even more difficult for me. I appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top