Combining data

  • Thread starter Thread starter Nexus
  • Start date Start date
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!
 
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
 
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.
 
Back
Top