Combining data

N

Nexus

How do I combine data (string) of 2 different controls
together into one field of corresponding table?

Example: Control 1 stores Transaction Type while control
2 stores Transaction Number... I want to combined these 2
into one field of the table called TransactionID.

Thanks!
 
G

Graham R Seach

If you're talking about doing it in a query, then...
SELECT [Transaction Type] & [Transaction Number] As TransactionID
FROM tblMyTable

If you're talking about doing it on a form...
Me!txtTransactionID = Me("Transaction Type") & Me("Transaction Number")

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
J

John Vinson

How do I combine data (string) of 2 different controls
together into one field of corresponding table?

Example: Control 1 stores Transaction Type while control
2 stores Transaction Number... I want to combined these 2
into one field of the table called TransactionID.

This is A Bad Thing To Do! Storing two disparate pieces of data
redundantly in the same field is very rarely appropriate.

Note that a Primary Key, or a foreign key, can consist of up to TEN
fields. It's not necessary to combine them in order to make the
combination unique.
 

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