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 1 1400
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 with a primary key of
'account', which contains an email address. If someone changes
their email address, I need to change the 'account' field.
Unfortunately, someone thought it would speed up lookups if instead
of having one table 'settings',...
|
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 well.
Short version :)
For Each fld In tdf.Fields
pos = InStr(fld.Name, "milk")
If pos > 0 Then
|
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...". The numeric and text fields
copy without a problem, but it all falls in a heap when I try to copy a
picture object field (data type OLE Object in both tables). I seem to be
missing something ???
Reduced to its simplest form, this is the code...
|
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.
|
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 didn't think I would ever use it.
TIA
Mark
| |
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 the data and writing a SQL
insert command, but there are a ton of fields. It would take forever to get
the datatypes correct and the SQL formatted properly. Anyone know how to
just copy a record and make a couple changes to it?
Thanks
Jeff
|
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 that information to another
table that only has only these 4 fields in it. Since the form is bound
to one table, how can I write these 4 fields to a different table.
These fields will be written when on on click event occurs on a button.
Any help...
|
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 out to
the "archive" table when they leave, by pushing the "check-out"
button. I see the steps as follows:
1. When the check-out button is pressed, the computer should
automatically add the current date into the "date checked-out" field.
...
|
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 Error' on row 107 (which, looking
at all visible data, there appears to be no difference than the 100
rows before it).
Failed: Copying to a different database.
Failed: Copying to the Same database with a different table name.
|
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 (let's call it oldTable, and I need
to copy everything EXCEPT the data).
- Then I need to delete oldTable, and rename newTable 'oldTable'
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |