Merge Colums in a query

bberrelez

New member
Local time
Today, 02:33
Joined
Jan 30, 2008
Messages
5
I am making this harder than it has to be i'm sure. I had a previous post of auto-texting a field, well why can't I just take two fields I have, such as the ID field which is an autonumber field and combine that with a type field that I have which is D.

If I could merge this in a query, wouldn't it give me the results as D01, D02, etc?

I couldn't find anything helpful online, one side said do the following.

SELECT receivables2.type+receivables2.ID
FROM receivables2;

Only I get errors.

I also tried this.

SELECT merge(receivables2.type; receivables2.ID);
FROM receivables2;

But it says merge is an invalid expression.

Could someone please help?
 
Try

SELECT receivables2.type & receivables2.ID AS MergeField
FROM receivables2;
 
Thanks! That is what I was hoping to get. Would it be possible to take these results and insert them back into the receivables table in a new column? I am hoping I can acheive an almost autotext result, hopefully I am not overkilling this thing.
 
You could use an update query but why would you want to store this if you can use the above expression to get the same result? Seems like a waste of space.
 
Well I'm doing this as a data import into an accounting program. I need this special D01 number to automatically create a new line into our Invoices. I would like to be able to dump a huge amount of invoice lines that I am receiving in a spreadsheet, copy this data in, run the query and have it update everything with a new entry as D##. Right now on my table I just have an empty column of freight_code. So I was hoping to run this query and when it ran it would enter this new code into my current table.
 
Why not just export the query to a spreadsheet?
 
Thought about that but then I might as well just copy my queried field and insert it back in the original table. That would work but I was hoping to acheive the autofill. The program is using an ODBC connection to Access I could use Excel, either way I suppose. Is there a way to accomplish auto-text in Access I could only find a way to autonumber am I not allowed to place even one letter in for automation?
 

Users who are viewing this thread

Back
Top Bottom