473,395 Members | 1,629 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,395 software developers and data experts.

VBA add data to linked tables

I have 3 tables, with relationships like:
Table1\Project (primary key)
Table2\Project (link to Table1)
Table2\StatusReport
Table2\Index (primary key)
Table3\Index (link to table2)
Table3\Notes

All those are one to many relationships, so

Table1 -> Table2 -> Table3
I have a form that works to input data into these, and if I browse the raw tables I also can add the data, maintaining the links and all that. The question is - how can I do it in VBA? My goal is to import from current excel-based status reports specific cells into different places in all three tables. But I don't have a clue where to start actually adding the data to the tables. I've got the excel object side of things ok, and I can read the values I want - I just don't know how to put them where they go.
Feb 4 '12 #1

✓ answered by NeoPa

Always populate the One side of a One-to-Many link first. In this case import [Table1] data, followed by [Table2], followed by [Table3].

5 2176
NeoPa
32,556 Expert Mod 16PB
Always populate the One side of a One-to-Many link first. In this case import [Table1] data, followed by [Table2], followed by [Table3].
Feb 4 '12 #2
Right - I know that's how it works when using the table or form view, but how to I do that programatically in vba code?

In other words, when I populate Table2 data, how do I make sure it is linked to the correct key in Table1?
Feb 4 '12 #3
NeoPa
32,556 Expert Mod 16PB
The links are in the data itself. According to your question they are already set and in place. Why would you feel anything more than importing the data is necessary?
Feb 4 '12 #4
You're absolutely correct - I've been thinking about this off and on during the day, and it makes total sense. All I have to do is populate the link field right, and then everything will add up correctly. Sorry for the slow thinking, and thanks for the help.
Feb 5 '12 #5
NeoPa
32,556 Expert Mod 16PB
You're sorted is all that matters Bruce :-)

Besides, it's not at all unusual, even for experienced database workers, to get temporary blind-spots where the obvious is just invisible for a bit ;-)
Feb 5 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: pinballjim | last post by:
Hello everyone, I'm looking for a simple way to create a local copy of a linked table. I've got a database that links about 10 tables from other databases. This works fine on my machine, but I...
2
by: Internet Arrow Limited | last post by:
Hi, I have a requirement to write an access application that must run under access97 and access2K. Some users will use Acess2K to access data that will also be accessed by Access97 users. The...
4
by: anand | last post by:
Hi, I have an Access 2000 database, which contains some native tables, and some linked tables which belong to an ORACLE database, through ODBC. Using VB.NET, I am trying to fetch some data by...
7
by: Joe | last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource (using Oracle ODBC drivers). After linking the tables in Access, I inspect the data contained in the linked tables. For...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
25
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in...
1
by: sparks | last post by:
We have an older database done in access 97 and some of its reports use linked tables to another database.. it works fine when opened in access 97. One of the people using the database only has...
4
by: lieslmurdoch | last post by:
Hi All, Please help. I want to use an access db with linked tables to distribute to stand-alone pc's. This db will act as a reporting tool. I'm using linked tables to access the data. Can I...
3
by: Bret Kuhns | last post by:
I recently started a co-op/internship at a company and they are looking to migrate a large legacy supported application from OLEDB to SQL Server. I'm doing prelim work in experimenting with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.