[solved]cr Lf In Access Query Follow

0
Avatar
Legacy Poster

Hi

I have a Access Query, that joins 12 datsbase fields.
It prints fine as a 2D lable.

I want a <<CR>> <<LF>> in the query, and I have tried a lot of things, but nothing has worked.
How do I enter a newline into the access query?

J;-)

6 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

I'm not sure if I understand why you are wanting to insert these characters into a query. What is the end result you are trying to achieve? Is the query using a BarTender query prompt or are you specifying a custom SQL statement?

Generally, in order to insert special or reserved characters into a query you would "escape" them by putting in the same character twice. I've never tried this with <CR> and <LF> characters myself, but if we allow it, then this is how it would be done.
0
Avatar
Legacy Poster
Comment actions Permalink

Hi

I want to create the query in access and use it with the bartender database promt.
I want to separate two parts of the query with a change of line.

What I have today is:

[Query1][Query2] (this is what it looks like when I read it with my 2d barcode scanner)

What I want is:
[Query1]
[Query2]

It's possible to have the line change when I do "from screen" barcodes, but I can't get it to work with an access query.

My Access Query looks some thing like this:

Query1: [SomeField1] & " " & [SomeField2]
Query2: [SomeField3]

J;-)
0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

If you make a query in Access this is also know as a "View". In BarTender you can then configure the database connection wizard to link directly to a table or a view if you prefer which contains pre-filtered records.

It's not clear from your last comment, but are you wanting to fill two query prompt fields automatically with a single scan of your 2d barcode? If this is the case then really you should configure your barcode or scanner to input a tab or carriage return character, between the two fields in the barcode, thus forcing the cursor to switch between the two input fields at time of scan.

Most 2D barcodes can encode these control characters, if not you can use a substitute character or string (example: <TAB> or <CR>) and then program the scanner to substitute in the control code when read.
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='Ian C - Seagull Support' timestamp='1307977128' post='63']
If you make a query in Access this is also know as a "View". In BarTender you can then configure the database connection wizard to link directly to a table or a view if you prefer which contains pre-filtered records.

It's not clear from your last comment, but are you wanting to fill two query prompt fields automatically with a single scan of your 2d barcode? If this is the case then really you should configure your barcode or scanner to input a tab or carriage return character, between the two fields in the barcode, thus forcing the cursor to switch between the two input fields at time of scan.

Most 2D barcodes can encode these control characters, if not you can use a substitute character or string (example: <TAB> or <CR>) and then program the scanner to substitute in the control code when read.
[/quote]

Hi

No I have a Database with information about cables.
I want to make a 2D label with these informations.
The informations are collected buy querys, and I want to print these 5 querys into a 2D label with a "linefeed" between each query.

J;-)
0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

When you say "Queries", are you really refering to the fact that in Microsoft Access you've created 5 queries under the "Queries" tab? If yes, how many database fields are shown for each query?

Although you can connect to one or more "Queries" in BarTender's database connection setup dialog, in your 2D bar code you would actually be selecting "Database Fields" for your variable data.

In these database fields, inside Microsoft Access, you can write an unused character at the end of the data and then program your bar code scanner to substitute this unused character with a CR LF.

If you feel sending the BarTender label format and database file will help to clarify things, please do so. We've already been speaking by email on this same question, so just reply to the latest email I sent to you.
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='Domingo - Seagull Support' timestamp='1308044097' post='67']
When you say "Queries", are you really refering to the fact that in Microsoft Access you've created 5 queries under the "Queries" tab? If yes, how many database fields are shown for each query?

Although you can connect to one or more "Queries" in BarTender's database connection setup dialog, in your 2D bar code you would actually be selecting "Database Fields" for your variable data.

In these database fields, inside Microsoft Access, you can write an unused character at the end of the data and then program your bar code scanner to substitute this unused character with a CR LF.

If you feel sending the BarTender label format and database file will help to clarify things, please do so. We've already been speaking by email on this same question, so just reply to the latest email I sent to you.
[/quote]

Hi

I would have to clear the DB of data as parts of the data are confidential.
But I think I just solved my problem.

If I do my Queries like this (in access):
Label: [Query1] & Chr(13) & [Query2]

Then I import the Labey query into Bartender.
And My print out looks like this:
Query1
Query2

Now is there a way to create a a button on a Access form that uses bartender to print the current label? (should I create a new post in the Forum)

Please sign in to leave a comment.