Update information from table to table

Mallol02

Registered User.
Local time
Today, 13:04
Joined
Feb 23, 2009
Messages
15
Greetings,

I have a database that the user enters a file number for custumers and those file number will be related in other tables. Example

in my Main Form I entered the file number of AR-1234 but in the subform all the information i enter will save that file number. and that file number will be save in another table.

my problem is that when I change the file number on my MAIN. The subform does not change or update that file number. what it does is that creates a new entry insted of leaving the old information that i had enter before.

There is a possibility that when the user relalize any changes to the file number, the subform "child table" change, too?


Thanks for the help you can give me
 
It's best to relate records in different tables by using a value that will never need to change - in practical terms, this often means using an autonumber field in the main table (it will create an artificial key that bears no relation to anything in the real world - just use it to keep your records related - no need even to show it to the user).

Then store the file number in one table only (if you need it anywhere else, you can query it using the relationship based on the autonumber key)
 
It's best to relate records in different tables by using a value that will never need to change - in practical terms, this often means using an autonumber field in the main table (it will create an artificial key that bears no relation to anything in the real world - just use it to keep your records related - no need even to show it to the user).

Then store the file number in one table only (if you need it anywhere else, you can query it using the relationship based on the autonumber key)
Yes i can do this in the main table because my primary key is a no duplicate but the other tables will duplicate the File number. because of the services.!
 
Yes i can do this in the main table because my primary key is a no duplicate but the other tables will duplicate the File number. because of the services.!

That's OK - it will only be the primary key in the main table - in other tables, it won't even be an autonumber - just an integer field that stores the foreign key reference to the main table's primary key - so you can have multiple records in all of the satellite tables, referring to one record in the main one.
 

Users who are viewing this thread

Back
Top Bottom