Solved

Use of Pipe symbol as Text

Posted on 2002-03-07
6
760 Views
Last Modified: 2010-05-18
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
Comment
Question by:JohnValue
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
xSinbad earned 50 total points
ID: 6848492
Have you tried using chr(124) in it place?
0
 
LVL 7

Expert Comment

by:lmerrell
ID: 6848508
Instead of using "|" in your code use Chr(124).

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

lmerrell
0
 
LVL 7

Expert Comment

by:lmerrell
ID: 6848511
Sorry, xSinbad.  I just got through finding the chr equivilant of |.  :-)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:JohnValue
ID: 6848524
Thanks!!!

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

You-da-man!
0
 
LVL 6

Expert Comment

by:xSinbad
ID: 6848545
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
 
LVL 7

Expert Comment

by:lmerrell
ID: 6848559
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question