marku24
asked on
Run Save command from one Access form to another
I have a form (FormMain) and a subform (subformMain). I am trying to execute a command while in FormMain but cannot get it to work until the data in subformMain is saved. I can press a SAVE button in the subform and all works fine but I would like to automate this. I would think it would be something like:
Form_FormMain.subformMain. runcmd save.... I know that is wrong but the concept is there.
Is there a way to run the save procedure from another form?
Thanks
Form_FormMain.subformMain.
Is there a way to run the save procedure from another form?
Thanks
ASKER
it is telling me the form isn't open but it is open. I need to save the record. Would I use acForm to save the record as well?
If you just want to save the data, you can try this:
Form_FormMain.subformMain.subformMain.dirty = false
ASKER
it doesn't recognize dirty as a property and generates an error. Also, am I writing the sub form name twice as you have above?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This solution actually worked for me. I posted it to help anyone searching.
Open in new window