Solved

Use of Pipe symbol as Text

Posted on 2002-03-07
6
747 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now