• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 834
  • Last Modified:

Use of Pipe symbol as Text

I have a database that uses a bar-code reader to input data.  The barcode uses the Pipe symbol "|" as a delimiter between data segements.  I wish to query data out of an Access DB and place the pipe in the string using something like the following:

BarCode: "TEXT" & [TableName].[Field] & "|" & [TableName2].[Field]

Access will not let me enclose the Pipe in quotations to represent it as text.  I get the error "The expression you entered has an invalid string". Virtually any other symbol or character I enclose in the quotations will work and print as text in the string.  But not the Pipe?!?!

Any Suggestions??
0
JohnValue
Asked:
JohnValue
  • 3
  • 2
1 Solution
 
xSinbadCommented:
Have you tried using chr(124) in it place?
0
 
lmerrellCommented:
Instead of using "|" in your code use Chr(124).

BarCode: "TEXT" & [TableName].[Field] & Chr(124) & [TableName2].[Field]

lmerrell
0
 
lmerrellCommented:
Sorry, xSinbad.  I just got through finding the chr equivilant of |.  :-)
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
JohnValueAuthor Commented:
Thanks!!!

I say the character set 124 but did not know how to insert it.

You-da-man!
0
 
xSinbadCommented:
lmerrell I was lucky I have Hex Workshop so I put a pipe in a txt file and opened it with Hex Workshop and there it was.

Any time JohnValue.
0
 
lmerrellCommented:
I had to open Access and invoke the debug window and put in:

?asc("|")

I just took a minute to think of doing it that way.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now