A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

One-to-one relationship



 
 
Thread Tools Display Modes
  #1  
Old January 24th, 2010, 01:19 AM posted to microsoft.public.access.tablesdbdesign
Enid
external usenet poster
 
Posts: 1
Default 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  
Old January 24th, 2010, 01:37 AM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default 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  
Old January 24th, 2010, 02:05 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.