473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Editing incorrectly entered records on a form

I have a database created in Access 2000 that has one form (DataEntryfrm) with one subform (Trainingsubfrm). The main form is linked tblParticipant (no duplicates allowed) and the subform is linked to tblTraining (duplicates allowed). The primary key is SSN. Referential integrity has been placed on the tables with cascading updates and deletions.

The premise is to collect the number of trainings attended by an individual. A search is performed when a SSN is entered. And if a person has already been entered into the database, the previously entered information will appear in the form.

The problem.... People are incorrectly entering SSNs and discovering it after they type in the correct SSN and a match does not occur. How do they then edit the incorrect record and have all of the related information connect to the correct record?
Mar 7 '08 #1
2 1175
jeffstl
432 Expert 256MB
If you used the SSN as your unique identifier and that is what ties the tables together your not going to like the answer.

You have to go through all the records of your subform table and change the SSN back to the correct one if you want to link them with the proper SSN.

Obviously creating a new record with the correct SSN wont "automatically" link the old records with the incorrect SSN to them. You have to manually (or via a script) update all the subform records with the corrected SSN.

To avoid this in the future you should link your main table and your sub table with a autonumber key or some other identifier.....not the SSN. This way the SSN can change, but the linkage between the records will still be ok.

That way if someone (through trial and error searching for a mis-type) finally corrects thier SSN to the right one on the main record, all thier sub-form records are still linked to the main one.
Mar 7 '08 #2
mshmyob
904 Expert 512MB
Before you try and fix the data anomolies you should consider designing your table structure properly.

I am not sure if you said both tables have SSN as the primary key but if you did then this is incorrect. 2nd you said that the one table doesn't have a proper primary key. Primary keys cannot allow duplication.

I assume your one table has SSN as the primary key (this is unique) and your foreign key in table 2 is SSN and this allows duplication. You need a primary key in table 2 that does not allow duplication.

If you do it correctly when table 1 has a SSN entered it would automatically populate SSN in table 2 and not allow it to be changed.

If you need help redesigning your table structures please let us know more details of what you need.

cheers,
Mar 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: webhigh | last post by:
Iım not sure if this a PHP question or an MySQL question but here it goes. I have a repeat region of a table called userid What Iım trying to accomplish is being able to edit the record and...
5
by: Sue | last post by:
As soon as a character is entered in the first field of a new record, the number of records shown in the navigation buttons increases by 1 and the new record button becomes enabled. In the...
3
by: Anthony Kroes | last post by:
I have a subform on a form and they are not linked. On the main form is a text box where the user types in a number. When that number changes, I have some code to make the corresponding text...
1
by: RC | last post by:
I have an Access 2002 database with many tables and forms (but just to keep things simple, let's say the DB has one Table "Table1" and one Form "Form1"). I have managed to cobble together so much...
0
by: Junkguy | last post by:
I need to be able to tell if the blank row of a DataGrid has been edited or not. In a DataGrid, you may notice that if you click on the asterisk row, the asterisk will change to a triangle, but...
0
by: jason | last post by:
hi, I have a datagrid in my input form. Using datagrid inplace editing to save data (chinese characters) entered by user. It works as expected on my test record. But, when i started to...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
2
by: OM | last post by:
I have two tables, one with categories in it, and only 3 records - Wages, Salary, Contract. I have a second table that records hours and numbers of employees in each category, per month. How do...
4
by: helenwheelss | last post by:
Access 2003, using a bound form. I'm seeing rather annoying behaviour when editing data in a control with a default value. It only happens when the form is on a new record. A specific...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.