Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronize 2 Forms

Status
Not open for further replies.

AccessApprentice

Programmer
Apr 14, 2005
14
0
0
US
If I have a child table that is related to a parent table by a parentid but I want to enter the parent info from either form and have it synchronize the changes from form to form what is the best way to go about this(if possible)....Meaning I want to be able to enter the child's parent info on the child form and have that info update the parent table but I also want the capability to update the info from the parent form. Please let me know how the name the controls on the forms.
 
Why not just use form / subform?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
How are ya AccessApprentice . . . . .
AccessApprentice said:
[blue]I want to enter the parent info from either form and have it synchronize the changes from form to form what is the best way to go about this.[/blue]
This dictates a form with subform, and if there linked properly, the rule is:
[blue]You can't add a record in a subform unless there's a corresponding Linked ID (usually primaryKey) in the mainform.[/blue]
This alone ties you to entering data in the main form first, or, [purple]you can't (shouldn't) enter data in the Child first.[/purple] If you do and try to save . . . . you'll get an error anyway!

[blue]These are the rules[/blue] and are in fact [blue]the proper way to enter data[/blue] in a main/sub form combination. Its not just you . . . [purple]we all have to do it![/purple]

Now, you can program around this, but it would serve no real purpose. And having duplicate data in main & subform is not what a database is about.

Bear in mind . . . . you are the programmer, and there are times when you just have to exercise your power. For instance . . . . in no commerical DB that I've designed do I allow users to delete anything . . . espcially records. Its a pain and they all complain about it . . . . but [blue]it only takes that one unsatisified user to go in and delete everything . . . bada bing . . . baba boom![/blue] I have a pop-up that notifies the user to contact administration for this. Quite a few owners were against it, but over time they have been very thankful. I think you get the point.

[blue]Doing what you need to here, will save you alot of time & headache . . . . think about it . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top