Solved

Use of Pipe symbol as Text

Posted on 2002-03-07
6
773 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 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