If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
One-to-one relationship
I am importing a DB from Filemaker with info about students (names, address,
etc.). There is just one table and because it has been used for many years, it cannot be changed. I have created another table for additional student enrollment information. I have created a one-to-one relationship between the two tables using an autonumber primary key in the student table and a number primary key in the enrollment table. I have created two forms to add information to the tables. All new students are added via the old student form first. When I switch to the new student form, I cannot add the student number to the primary number field because it is bound to the Autonumber ID form. However, I can add new records directly into the table. Because other people will be using these forms, I would like to be able to update the number primary key by typing in the autonumber primary key. Is there any way to do this? Thanks. |
#2
|
|||
|
|||
One-to-one relationship
Enid
Is the "number primary key in the enrollment table" of type "Long"? That's the only "number" type that matches an Autonumber. -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Enid" wrote in message ... I am importing a DB from Filemaker with info about students (names, address, etc.). There is just one table and because it has been used for many years, it cannot be changed. I have created another table for additional student enrollment information. I have created a one-to-one relationship between the two tables using an autonumber primary key in the student table and a number primary key in the enrollment table. I have created two forms to add information to the tables. All new students are added via the old student form first. When I switch to the new student form, I cannot add the student number to the primary number field because it is bound to the Autonumber ID form. However, I can add new records directly into the table. Because other people will be using these forms, I would like to be able to update the number primary key by typing in the autonumber primary key. Is there any way to do this? Thanks. |
#3
|
|||
|
|||
One-to-one relationship
On Sat, 23 Jan 2010 16:19:03 -0800, Enid
wrote: I am importing a DB from Filemaker with info about students (names, address, etc.). There is just one table and because it has been used for many years, it cannot be changed. I have created another table for additional student enrollment information. I have created a one-to-one relationship between the two tables using an autonumber primary key in the student table and a number primary key in the enrollment table. I have created two forms to add information to the tables. All new students are added via the old student form first. When I switch to the new student form, I cannot add the student number to the primary number field because it is bound to the Autonumber ID form. However, I can add new records directly into the table. Because other people will be using these forms, I would like to be able to update the number primary key by typing in the autonumber primary key. Is there any way to do this? Thanks. Simply make the additional-data form a Subform of the student form, using the autonumber field as the Master Link Field and the foreign key as the Child Link Field. Or, you can include BOTH ID fields in the form's recordsource, basing the form on a query including both tables; Access will fill in the foreign key value. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|