How do I combine all datarecords in one field into another field

M

Mariana

Is there a way (running a query, macro etc) to combine all data from one
field (different records) into one different field.

Example we have 500 records. Each has a account number in the "Facility ID
Number" Field. I want to take those 500 account numbers and update a
different field with those account numbers. Kind of like a string of account
numbers e.g, 00001, 00002, 00003 etc.
 
K

KARL DEWEY

Why not paste special to Word - Unformated Text.
Then Replace All ^p with a comma and a space.
 
M

Mariana

Thats one way, our database has 50,000 records. We are trying to format a
table that we can import into our email broadcaster. The broadcaster looks
at fields, so I want to send an email to one email address (instead of 300)
We could have 300 different accounts (different sites) with the same email
address. I need to have one field that has all acounnt numbers and one field
that has the email address.
 
J

John Vinson

Is there a way (running a query, macro etc) to combine all data from one
field (different records) into one different field.

Example we have 500 records. Each has a account number in the "Facility ID
Number" Field. I want to take those 500 account numbers and update a
different field with those account numbers. Kind of like a string of account
numbers e.g, 00001, 00002, 00003 etc.

There's sample code to do this at

http://www.mvps.org/access/modules/mdl0004.htm


John W. Vinson[MVP]
 
L

Lisa

Hi...

I am from Mariana's office. We like the idea of using a query because of
the simplicity, the problem is... none of what has been given seems to work
in Access 2003. It seems they are all Access 2000 related.

Does anyone know how to query this in Access 2003? If not, the code should
be Access 2003 also, thanks for your help.
 
J

John Vinson

Hi...

I am from Mariana's office. We like the idea of using a query because of
the simplicity, the problem is... none of what has been given seems to work
in Access 2003. It seems they are all Access 2000 related.

Does anyone know how to query this in Access 2003? If not, the code should
be Access 2003 also, thanks for your help.

This cannot be done efficiently in a Query. You must use VBA code.

And the VBA code that works for A2000 works just fine in A2003, unless
you have something wrong. There are very few code differences between
the two versions; code written for A2000 should run just fine in
A2003. If it doesn't, please post the code that you're using and
indicate in what way it "doesn't work".

John W. Vinson[MVP]
 
Top