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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Parent Record

Status
Not open for further replies.

Drenda

Programmer
Sep 1, 2007
85
GB
Can anyone help

Is there any way to save the record of a parent from from a subform

An example of my problem is as follows;
I have two controls on a subform and have set code / Macros against each of them on after update

the first subform control changes the value of a control in the mainform
the second subform control locks the value of the same control in the main form but I get a message saying
1 can't lock a control when it has unsaved changes.
I have tried a number of attempts such as

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
which does not work and I assume I am only saving the record on the subform as the subform has focus
I have tried setting the focus to the main form, saving the record and then resettinh the focus back to the subform and this doesn't seem to work either

Just thought someone might have a way to get around this problem

 
How are ya Drenda . . .
Drenda said:
[blue]Is there any way to save the record of a parent from from a subform?[/blue]
The answer is no! . . . or at the very least should'nt be done so!

Normally in a secnario involving [blue]Parent form[/blue] properly linked to the [blue]ChildForm[/blue] thru [blue]Master/Link[/blue] properties, the MainForm automatically saves when you move the focus form mainform to child/subform!

Also . . . your working in reverse as far as relationships are concerned. Normal navigation prescribes updating the parent before you update the child!

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top