View Full Version : Linked table help


Hyapathia
06-27-2003, 01:02 PM
Hi there,

I've been trying to fix something in my database for a week - and I guess my lack of training has lead to this unfortunate snag!!

If anyone has any suggestions- it would be appreciated. Also, i'm sure the solution is likely quite simple - :rolleyes:


Here's what I have and want to do:

Tables: 2 that are linked. One is a main 'project' table that contains tons of info about projects. It contains a primary key ID and several secondary keys. One of these keys is linked to the second table. This second table (called 'FO') contains a series of numbers that are constants and are linked to each project in the first project table.

What I am trying to do is every time I create and add a new project to the main project table, I want account information from FO table to get stored into the project table. I can't just store the primary key of FO because the account numbers change periodically. For example, the FO account numbers for February and March projects are 35 45 22 3 545 23232 444 and 34. But for April to June they are 89 3 123 343 22 333 123123 and 90. So for each project saved (corresponding to a record in the projects table), I'd like the correct account information to also be stored into this row.

I've been using Queries, Forms, and Report, but haven't found a simple way of doing this!
:confused:


HELP APPRECIATED!
:cool:

Susan

FoFa
06-30-2003, 08:30 AM
Ok, if you truly need to store the account number in the main table, than why do you have a foreign key linking the table?
One of these keys is linked to the second table. This second table (called 'FO') contains a series of numbers that are constants and are linked to each project in the first project table.
Do away with the foreign key, use a combobox to select the value from the FO table and store it in your main table.
Of course a better solution would be to keep the values in the FO table, and just add new rows when the values change leaving the links proper for the life of the data.