473,402 Members | 2,046 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,402 software developers and data experts.

Copying fields from one table to another

Hi Guys, I'm hoping one of you will give me a leg up with a problem Im
having, which I think is possible to do. Let me explain.

I have 2 tables and 1 form - ie 'tableDigit', 'tableNumber' and
'formDigit'.

'tableDigit' has 2 fields - ie 'digit1' and 'digit2',
'formDigit' is used to input data to 'tableDigit'.
'tableNumber' has 1 field - ie 'Number'

Lets say that the first 2 records of tableDigit have the following
data.
Record 1 - Field 1 = A, Field 2 = B.
Record 2 - Field 1 = C, Field 2 = D,

I want to put a button on formDigit that will open do the following
1 - open 'tableNumber' (I can do that)
2 - go to a new record in tableNumber (I can do that)
3 - populate the (single field) records of tableNumber, as follows
1st record = 'A' followed by a space, then 'C'
2nd record = 'A' followed by a space, then 'D'
3rd record = 'C' followed by a space, then 'A'
4th record = 'C' followed by a space, then 'B'
4 - Save the table (I can do that)
5 - Close the table (I can do that)

Basically, the essence of my query is what code (if any) can I use to
loop through the records and fields of tableDigit, and auto-write the
values to the records of tableNumber.

Any help would be greatly appreciated, thnks, Jimbo
Nov 13 '05 #1
1 1375
Jimbo wrote:
I want to put a button on formDigit that will open do the following
1 - open 'tableNumber' (I can do that)
2 - go to a new record in tableNumber (I can do that)
3 - populate the (single field) records of tableNumber, as follows
1st record = 'A' followed by a space, then 'C'
2nd record = 'A' followed by a space, then 'D'
3rd record = 'C' followed by a space, then 'A'
4th record = 'C' followed by a space, then 'B'
4 - Save the table (I can do that)
5 - Close the table (I can do that)


You are trying to do too much by hand. Usually, you put records in a
table by using an insert query.

Of course you can loop a recordset (opened table, or query) but I
suggest you try to formulate the records to be inserted as a query result.
Nov 13 '05 #2

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

Similar topics

4
by: Gordon Burditt | last post by:
What's the easiest way to copy a row from one table to another (with the same schema), without knowing in advance the number and types of the columns? The problem: I have several sets of tables...
3
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
5
by: Lyn | last post by:
I am trying to copy selected fields from one table to another, by reading the source table record into a recordset (ADO) and then copying the relevant fields to an SQL statement "INSERT INTO...". ...
3
by: VM | last post by:
How can I copy the contents of one datatable to another datatable? I've already the source table so I only need to copy its rows. Thanks.
16
by: NoodNutt | last post by:
G'day ppl Is there a process whereby I can copy the text labels of all the files in a root directory? I recall going back a long way seeing something about it but did not take any notice as I...
6
by: Jeff Brooks | last post by:
I need to copy a record one access record into the same table. I just need to modify a couple fields that the user will change. Im sure there is an easy way to do it. I have started just reading...
1
by: WØCBF | last post by:
Greetings, I have a form that is bound to a table that has about 15 fields in it and all of the fields are displayed on the main form. I have 4 fields that will be updated and I want to write...
8
by: daD | last post by:
I'm trying to write a small database that tracks people coming and going from a small campground. I need to have the current guests in the "current" table" and then have the ability to check them...
0
by: berwiki | last post by:
I am trying to copy a table to another SQL 2000 Database, but I continually get errors. When I right-click, choose All-Tasks, Export-Data and go through the DTS settings, I get an 'Unspecified...
5
by: mark_aok | last post by:
Hi all, I have a situation where I have a split database. At the back end, I need to - create a new table (I will call it newTable) with the exact fields, and relationships as another table...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.