Stephen K Posted March 21, 2005 Author Posted March 21, 2005 I have two files: File 1: id, first name, family name, various fields about student behaviour File 2: id, first name, family name, various fields about family If File 1 is the master file with id being the key field, is there a way of inputting new student id (+ names)in the master file (file 1)that automatically appears in file 2 that I can later go to complete all of the other family information. I suspect I am being complicated and should set up old file 2 as the master file (where information won't change regularly) with associated relationships to provide names etc for old file 1 where the information will be regularly added to...I know what I mean!!! TIA Stephen
Stephen K Posted March 21, 2005 Posted March 21, 2005 I have two files: File 1: id, first name, family name, various fields about student behaviour File 2: id, first name, family name, various fields about family If File 1 is the master file with id being the key field, is there a way of inputting new student id (+ names)in the master file (file 1)that automatically appears in file 2 that I can later go to complete all of the other family information. I suspect I am being complicated and should set up old file 2 as the master file (where information won't change regularly) with associated relationships to provide names etc for old file 1 where the information will be regularly added to...I know what I mean!!! TIA Stephen
sbg2 Posted March 21, 2005 Posted March 21, 2005 Create a relationship between file1 and file2 based on ID = ID. In file 2 go to Define Database, highlight field, select Options and on the Auto-Enter tab check the Looked-up Value box. Select File1 and the appropriate field to look-up data from. Repeat for other fields in file2.
sbg2 Posted March 21, 2005 Posted March 21, 2005 Create a relationship between file1 and file2 based on ID = ID. In file 2 go to Define Database, highlight field, select Options and on the Auto-Enter tab check the Looked-up Value box. Select File1 and the appropriate field to look-up data from. Repeat for other fields in file2.
NYPoke Posted March 21, 2005 Posted March 21, 2005 In theory (Fifth Normal Form for Relational Databases), you should only keep the Name, Family Name, many other fields in the first table. Keep the id in both files. I'm sure you already have a relationship based on id. In the File 2, when you want to display data from File 1, like name, you reference it directly. IdRelationship::First Name, IdRelationship::Last Name, Id Relationship::Zip Code, ... (Don't duplicate data.) As far as creating a new record, you should be able to do this with scripting. From File 1, use a Script to create the new record. Your field definition for id probably already creates a Unique Number for id (if not, it should). From File 1, call a script in File 2 to create a new record. Prior to making the call, set a global in File 2 with the id (in Version 6 & prior). In version 7, you can pass a parameter. Now set the id in File 2 in the new record. If you don't duplicate your data between the files, you now have a record in File 2, with access to any changes made to name, address, ..., in File 1. You can probably even put the fields from File 2 (about Family) on the File 1 layouts, since you created the record already. At that point, you shouldn't need to navigate to File 2 at all for the data entry.
Stephen K Posted March 21, 2005 Author Posted March 21, 2005 Thanks folks...I'll try them out! Stephen
Recommended Posts
This topic is 7244 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now