In and Table,can I concatenate two entries to create a separate en

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an entry in the Customer Order Field of 1677.
I have an entry in the Item Number Field of 0001

I want my entry in the Customer Order Primary Key Field to be 16770001.

Is there a way to concatenate the entries of the first two fields and enter
the that line of text into the third field?

Thanks for your help.
Respectfully,
Darrell
 
Don't store the value in the table. Instead, create a query that has a
computed field that does the concatenation for you, and use the query
wherever you would otherwise have used the table. Computed values should
never be stored in the table if they're strictly dependent on other values
already stored there.

In a vacant column in the query builder, type the following on the Field
row:

[Customer Order Primary Key]: [Customer Order] & [Item Number]

If the only reason you're doing this, though, is to create a primary key,
there's no need to: the Primary Key in Access can contain up to 10 separate
fields. With the table open in Design mode, select the two fields and click
on the Key to make the combination of the two fields the Primary Key for
your table.
 
You should combine the two fields in a query as needed. You could also
combine them in an unbound text box on a form or report. If the two fields
together are needed to guarantee uniqueness then you can make a
multiple-field primary key. See Help for more information about this.
 

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

Back
Top