473,466 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1464
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.