Autofill

TimjHebert

Registered User.
Local time
Today, 10:29
Joined
Dec 12, 2004
Messages
40
I cant get my form to autofill. can someone check my file and see what the problem is?
 
Sorry here is my file, please tell me what is wrong

Please look at the file and tell me what is wrong
 

Attachments

Your select query for the form includes both Contacts and Contacts2 tables and they are joined with an equal join on ContactID (which is an autonumber in both tables). This is not good.

First reason:
By joining the two ContactID numbers as equal joins, you will only get records that have a direct match in BOTH tables.

Second reason:
You CANNOT have an autonumber in BOTH tables that will be the Primary Key (PK) in one table and the Foreign Key (FK) in the other. Autonumber will create a new number (not necessarily consecutive, but unique for each table) and that new number in one table may not match the other table. If you are going to have info in a second table, you will need to put the ContactID from ONE table and place it into the other table as a FK.

So, you need to change the second table's ContactID number from Autonumber to just number (long) and use that to populate the info into the second table. Check out the search on the site here for "Relationships" and Primary/Foreign keys.
 

Users who are viewing this thread

Back
Top Bottom