Barcode font

  • Thread starter injanib via AccessMonster.com
  • Start date

I

injanib via AccessMonster.com

At first I thought this should be easy, but then I found it otherwise.
my form has a field that automatically generates a unique number as the
record ID. In the report I have this field display the number in barcode font
so that later I can just scan the barcodes and update the record. However, in
order for my scanner to scan this barcode I need to add an astrick (*) to the
begining and end of this number. How can I do this without any changes to its
setup in the form?
I don't want the astrisks to show in the form and it should not change the
field value in the table.

Thanks in advance.
 
Ad

Advertisements

D

Douglas J. Steele

Create a query with a calculated field "*" & [NameOfFIeld] & "*"

Use the query wherever you would otherwise have used the table.
 
D

David W. Fenton

Create a query with a calculated field "*" & [NameOfFIeld] & "*"

Use the query wherever you would otherwise have used the table.

Wouldn't it more efficient to do that in the controlsource on the
report?
 
D

Douglas J. Steele

David W. Fenton said:
Create a query with a calculated field "*" & [NameOfFIeld] & "*"

Use the query wherever you would otherwise have used the table.

Wouldn't it more efficient to do that in the controlsource on the
report?

I wouldn't think it would make much difference efficiency-wise, and by
having it in a query, it's available for display in the form as well.
 
D

David W. Fenton

David W. Fenton said:
Create a query with a calculated field "*" & [NameOfFIeld] & "*"

Use the query wherever you would otherwise have used the table.

Wouldn't it more efficient to do that in the controlsource on the
report?

I wouldn't think it would make much difference efficiency-wise,
and by having it in a query, it's available for display in the
form as well.

Of course it's more efficient. If you do it in the recordsource,
it's going to be calculated for every row, but if you do it only in
the controlsource it will be calculated only for those rows that are
displayed/printed.

Unless it's needed for filtering or sorting, I never put calculated
fields in my recordsource.
 
I

injanib via AccessMonster.com

Ok, so I created the query and then added the line =[Tracking Query]!Expr1 in
the control source of the field in the report to link the field to the query.
First, did I do it right? If I did it right then the report does not display
the number. instead it displays "#Error"

When I add the line "*" & [NameOfFIeld] & "*" to the control source of the
field in the form it gives me a syntax error. I am not so sure what you mean
by adding it to the record source.
Create a query with a calculated field "*" & [NameOfFIeld] & "*"
[quoted text clipped - 6 lines]
and by having it in a query, it's available for display in the
form as well.

Of course it's more efficient. If you do it in the recordsource,
it's going to be calculated for every row, but if you do it only in
the controlsource it will be calculated only for those rows that are
displayed/printed.

Unless it's needed for filtering or sorting, I never put calculated
fields in my recordsource.
 
Ad

Advertisements

D

David W. Fenton

When I add the line "*" & [NameOfFIeld] & "*" to the control
source of the field in the form it gives me a syntax error.

That should be:

="*" & [NameOfFIeld] & "*"
 
I

injanib via AccessMonster.com

Yes, that is exactly how I have the line and I get those errors. I tried both,
putting the line in the control source of the field in he report and in the
field in a new query.
When I add the line "*" & [NameOfFIeld] & "*" to the control
source of the field in the form it gives me a syntax error.

That should be:

="*" & [NameOfFIeld] & "*"
 
D

David W. Fenton

David said:
When I add the line "*" & [NameOfFIeld] & "*" to the control
source of the field in the form it gives me a syntax error.

That should be:

="*" & [NameOfFIeld] & "*"

Yes, that is exactly how I have the line and I get those errors. I
tried both, putting the line in the control source of the field in
he report and in the field in a new query.

I assume you're replacing [NameOfField] with the actual name of the
field you're using for your barcode?

One thing you need to be careful of is that you don't want the name
of the control on the report to be the same as the name of the field
it's drawing its value from, because on reports and forms, the
Controls collection is searched first (before the Fields collection)
and if a match is found, you'll end up with an unresolvable circular
reference.
 
Ad

Advertisements

I

injanib via AccessMonster.com

Maybe that is what it was. I removed the space between the name of the field
in the table. It is working fine now. Thanks allot for your helpfull
responses
When I add the line "*" & [NameOfFIeld] & "*" to the control
source of the field in the form it gives me a syntax error.
[quoted text clipped - 6 lines]
tried both, putting the line in the control source of the field in
he report and in the field in a new query.

I assume you're replacing [NameOfField] with the actual name of the
field you're using for your barcode?

One thing you need to be careful of is that you don't want the name
of the control on the report to be the same as the name of the field
it's drawing its value from, because on reports and forms, the
Controls collection is searched first (before the Fields collection)
and if a match is found, you'll end up with an unresolvable circular
reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top