Autonumbers when we union tables

Golo

New member
Local time
Tomorrow, 07:09
Joined
May 8, 2021
Messages
9
Hi everyone!

So basically I have 2 tables with 3/3 identical fields: Customer ID (Autonumber, Primary Key), Type of Customer and Customer Name.
  • The Customer ID from Table 1 is formatted as 'PAR-"0000
  • The Customer ID from Table 2 is formatted as 'CHI-"0000
When I create a query to Union these 2 tables, the result is not what I have expected. Instead of displaying PAR-0001, PAR-0002 or CHI-0001, the result only displays 1, 2 and 1. It ignores the prefixes.

I have no idea how to make it displays as it is in the tables! Could someone help me with this one please!
 
you can have it in 1 table?

it will ignore the prefix, right because it is in different table.
if it is in same table, you just use the autonumber field.

otherwise, a vba function will help you.
 
Hi everyone!

So basically I have 2 tables with 3/3 identical fields: Customer ID (Autonumber, Primary Key), Type of Customer and Customer Name.
  • The Customer ID from Table 1 is formatted as 'PAR-"0000
  • The Customer ID from Table 2 is formatted as 'CHI-"0000
When I create a query to Union these 2 tables, the result is not what I have expected. Instead of displaying PAR-0001, PAR-0002 or CHI-0001, the result only displays 1, 2 and 1. It ignores the prefixes.

I have no idea how to make it displays as it is in the tables! Could someone help me with this one please!
Use that format in the query?
 

Users who are viewing this thread

Back
Top Bottom