By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

Form command

P: n/a
I have a main form that contains two subforms. The main form has no fields
other than the subforms. The purpose of this form is to perform inventory
transfers from one program to another of the same program products.
The problem that I am having is to save and create a new record for both
subforms at the same time when clicking on the ‘Complete Transfer’ button.

I have tried the following

DoCmd.GoToRecord acForm, “frmTransferActivity_subform1”,acNew
DoCmd.GoToRecord acForm, “frmTransferActivity_subform2”,acNew

This would give me an error message stating that the form wasn’t opened?!?!??!
?!?!?!?!?!?!

But I just settled on the following but this will only allow one transfer per
screen:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "Transfer Request was completed.", vbOKOnly, "Transfer Completed"
DoCmd.Close acForm, "frmTransferActivity"

Any suggestions?

--
Message posted via http://www.accessmonster.com

Sep 4 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sep 4, 11:15 am, "ladybug via AccessMonster.com" <u21071@uwe>
wrote:
I have a main form that contains two subforms. The main form has no fields
other than the subforms. The purpose of this form is to perform inventory
transfers from one program to another of the same program products.
The problem that I am having is to save and create a new record for both
subforms at the same time when clicking on the 'Complete Transfer' button.

I have tried the following

DoCmd.GoToRecord acForm, "frmTransferActivity_subform1",acNew
DoCmd.GoToRecord acForm, "frmTransferActivity_subform2",acNew

This would give me an error message stating that the form wasn't opened?!?!??!
?!?!?!?!?!?!

But I just settled on the following but this will only allow one transfer per
screen:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "Transfer Request was completed.", vbOKOnly, "Transfer Completed"
DoCmd.Close acForm, "frmTransferActivity"

Any suggestions?

--
Message posted viahttp://www.accessmonster.com
If you're trying to refer to subforms on a form, make life easier on
yourself... Keri Hardwick wrote a really helpful article on this - at
Access Web in the forms section.

Sep 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.