Appending Text from one column to another

G

Guest

Total newbie, easy question, but I can't find the answer. I have 3 columns:
Old DocID, Effective Date, and Procedure. I want to append the text strings
from the other columns to create a new Doc ID column. So:

DocID(77343)_11-08-2000_High-Dose

is created from Old DocID "77343" + Effective Date "11-08-2000" + Procedure
"High-Dose".

So, I know it's a no-brainer, but ...?
 
S

Steve Schapel

Max,

If you mean you want to add a new field to your table, then yes, it is a
no-brainer - don't. Very bad idea.

If you mean you want your data to be presented in this way on a form or
report, then you have 2 choices:

1. Make a calculated field in the query that the form or report is
based on (record source). Like this...
NewID: "(" & [Old DocID] & ")_" & Format([Effective
Date],"dd\-mm\-yyyy") & "_" & [Procedure]
.... and then bind a textbox on the form or report to this field.

2. Use a calculated control on the form or report itself, in other
words use this expression in the Control Source property of a textbox...
="(" & [Old DocID] & ")_" & Format([Effective Date],"dd\-mm\-yyyy") &
"_" & [Procedure]
 

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