473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Merging Records

I have an Access 2003 database with a table for customers and a table
for orders - linked by the cutomer number (a unique field in the
customer table).

Sometimes the staff set up a new customer when there already is the
same existing customer in the system. Therefore the system gives this
same customer a new unique customer number and the staff enters orders
against this new customer number.

How would I merge the new customer data with the old customer?

I would like to enter the new customer number into a box on a form and
then enter the old customer number into a box on the same form and have
the system move all of the history from the new customer to the old
customer.

Thanks for your help.

Nov 13 '05 #1
2 1459
cga:

Add a command button to your form, with code something like this:

Dim MySQL As String

MySQL = "UPDATE orders SET [customer number] = " _
& Me![old customer number] & _
& " WHERE [customer number] = " _
& Me![new customer number]

DoCmd.RunSQL (MySQL)

HTH,
Jana

Nov 13 '05 #2
cga:

BE SURE TO TEST THIS ON A COPY FIRST!!!

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike | last post by:
Hi! I also asked this question in C# group with no results: I have 2 datasets loaded with data from two xml files having the same schema. The files contain data from yesterday and today. I'd...
2
by: Emmett Power | last post by:
Hi, I have an Access table with a number of records which refer to the same person but with data in different fields. So for example the table would look like this: Name..............Field...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
0
by: Mike | last post by:
Hi! I have 2 datasets loaded with data from two xml files having the same schema. The files contain data from yesterday and today. I'd like to merge both datasets in such a way that the resulting...
1
by: actimel01 | last post by:
I know this question has been asked many times before but I can't find an answer that fits my data! I have two Access databases. The tables in each have the exactly the same fields except for one...
3
by: mike11d11 | last post by:
I have a dataset with a account table and another table that contains transactions for accounts in the account table. I create a crystal report based off an inner join query of the two tables but...
8
by: mike11d11 | last post by:
I have a dataset with a account table and another table that contains transactions for accounts in the account table. I create a crystal report based off an inner join query of the two tables but...
3
by: Ralph Smith | last post by:
I have two identical databases on two different servers and I need to add the data in tables from one server to the tables in the other server. Is there a way to do that in mysql? thanks, Ralph
6
by: Osiris | last post by:
I have a *VAST* database of 10's of millions records. THere are two kinds of records in it, A an B. An A-record may be referencing B records. B-records should be referenced by one or more...
1
by: BBMcL | last post by:
Advanced thanks for any helping. I'm running Python on a Mac OS X. Here's the basic situation. A single group of people had various health measurements performed on them over the course of a few...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.