Question How to set default value to use text and another field's data

gnarpeggio

Registered User.
Local time
Today, 06:29
Joined
Jun 22, 2010
Messages
74
Hello,

I'm trying to figure out how to pull information from one field on my table and have it displayed in conjunction with a preset text value as well.

I have a small DB that will create invoices for document reproduction jobs in our office. My vision is to use a bar code (which the font is installed on my PC already) that will contain the word INVOICE and also place the ID number (pulled from the ID Autonumber field I've created) on the value as well.

In short, I hope to get my barcode looking like this:

*INVOICE[ID]*

Note that the asterisks are required for a scan gun to "open" the bar code and "close" it.

Any help on this would be appreciated!
 
You could use the following in the Control Source of an unbound text box
Code:
= "*INVOICE" & Me.ID & "*"
Or anywhere else you need to display this value. Given that this is essentially a calculated field there is no need to store this value as it can be constructed any time you wish to display it.
 
I've been trying to apply this code onto an unbound text box as indicated, but it's not working. It's displaying the "#Name?" instead. I also tried to use this on a report to test it and the "Enter Parameter Value" message for the Me portion popped up.

Do you know if it's not noticing the Me.ID section of this code? My thought it was the asterisk at the end ( "*" ), but I can't figure it out.

Any ideas?
 
A control source can't use ME (that is VBA only).

You would use

="*INVOICE" & [ID] & "*"
 

Users who are viewing this thread

Back
Top Bottom