Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select values from two columns in one field?

Status
Not open for further replies.

drsayman

Technical User
Oct 23, 2011
2
BG
Hello, I have a form (Orders) with a subform (OrderDetails) that have a fields like a Barcode(from tblBarcode), ProductID(tblProducts), ProductName(tblProducts) and etc.

I want to union Barcode and ProductID fields into one where I can type ProductID.Value or Barcode.Value(if have Barcode) and fill in ProductID.Value in the same field.
;-) Or union three of them BarCode,ProductID,ProductName if can.
Thank's for a help in advance.
 
Hi dr,

No idea why you'd want this (I'm sure there's a better way of achieving your end-requirement), but:

Are all 3 fields the same data-type?

If not, then it can't be done without first converting them all to one single data-type in the union and then you'd have to convert them back when you wished to use them to relate to their specific fields.

Very messy.

ATB

Darrylle




Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Yes, all 3 are the same data type (text),and my form in this moment works fine when they are separated, but in the subform fields became too much and I wanted to at least one removed (barcode), and I always wondered how I could do this (pure curiosity).

Here are some more clarification on the task.
1. I have a tblBarcode with a fields ProductID (text) and Barcode (text).
2. I have a tblProducts-ProductID (text) and etc.
3. form OrderDetails with a field ProductID where if you enter "barcode" to write ProductID which refers to the barcode, but I want to can enter and ProductID when barcode missing.

I would like someone to tell me some direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top