Normal Topic Using subform results in duplicate records (Read 1014 times)
jyellis
Full Member
Members
***
Offline


No personal text

Posts: 114
Location: Dallas-Fort Worth Area
Joined: May 19th, 2003
Using subform results in duplicate records
Jan 15th, 2007 at 4:14am
Print Post Print Post  
Ok, obviously my first attempt at subforms is not setup correctly.
Profile Form (Name, DOB, etc)
FitnessEvaluation Form
Functional Movement Form

Subform Fitness Eval
Subform Functional Movement

There are two tests run on these employees.  Fitness Evaluation(FE)  & Functional Movement(FM)
On each of these forms (FE & FM); there is a search button (from Profile) for employee name/number; then the subform of the actual test.

When a record is saved; it saves a new record in the profile, too.  Thereby adding duplicate employees.

What have I done wrong?
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Using subform results in duplicate records
Reply #1 - Jan 15th, 2007 at 5:09am
Print Post Print Post  
You have subforms:
Subform Fitness Eval 
Subform Functional Movement

But it sounds like you are adding records in the main forms:
FitnessEvaluation Form
Functional Movement Form

I don't know how you are using these forms, but once you create subforms, you would usually use the Parent Profile form to add/delete subform records.  You might rarely use the FE or FM forms.  Their main purpose was design to be used as a subform.

I make it a practice to have a unique value in every record, in parent and in subforms also.
I also make it a practice to add a Key field to my subforms even though Sesesame does not require it.  On the subform I would include a ReadOnly,Invisible element that contains the unique ID of the parent form (Profile).  This helps to manually match subform records to parents.  This Parent ID is added to the subform record when it created from the Parent Form.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Using subform results in duplicate records
Reply #2 - Jan 15th, 2007 at 4:23pm
Print Post Print Post  
Hello Judy,

Are the Profile Form, FitnessEvaluation Form, and Functional Movement Form, all forms in the same database or does each form have it's own separate database?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
jyellis
Full Member
Members
***
Offline


No personal text

Posts: 114
Location: Dallas-Fort Worth Area
Joined: May 19th, 2003
Re: Using subform results in duplicate records
Reply #3 - Jan 15th, 2007 at 4:43pm
Print Post Print Post  
Structure:
FitEval
  • Profile
  • FitnessEvaluation
  • FunctionalMovement

FitEvalFrm
  • subform FitnessEval

AdditionalForms
  • subform functional Movement
  
Back to top
 
IP Logged
 
jyellis
Full Member
Members
***
Offline


No personal text

Posts: 114
Location: Dallas-Fort Worth Area
Joined: May 19th, 2003
Re: Using subform results in duplicate records
Reply #4 - Jan 15th, 2007 at 4:46pm
Print Post Print Post  
Profile:  used to enter static information on employees

Subform Fitness Eval and Subform Functional Movement: Date of test and fields for test results

FE & FM:  Empl#, LastN, FirstN, plus the embedded subform.  They click a button to display a picklist of employees (lookup from Profile).  Then user enter test results.

When I add record to FE or FM it adds records to Profile too.

I understand adding the Emp# as a key field that is read only, invisible on subform.
But I don't know how to restructure this to prevent the duplicates in the Profile.
  
Back to top
 
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: Using subform results in duplicate records
Reply #5 - Jan 15th, 2007 at 6:46pm
Print Post Print Post  
Because your forms Profile, FitnessEvaluation and FunctionalMovement are all in the same database (FitEval), they all have the same records. To avoid the duplicate record problem that you are seeing, you can create seperate databases for each of your forms. Or, another option is to use Search Update to retrieve the record for the person that you are adding a test for. Using Search Update will make the change to the existing record and will not create a new record.
If you have any more questions about this, please let us know.

Ben
  
Back to top
IP Logged
 
jyellis
Full Member
Members
***
Offline


No personal text

Posts: 114
Location: Dallas-Fort Worth Area
Joined: May 19th, 2003
Re: Using subform results in duplicate records
Reply #6 - Jan 15th, 2007 at 9:18pm
Print Post Print Post  
I can export the data.  Then import it.
But how do I copy these forms to different databases within the same file.
  
Back to top
 
IP Logged