473,441 Members | 1,877 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,441 software developers and data experts.

Form command

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
1 1523
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
Conditions: Register globals is set to on. Parse html as php is set to on. I have two forms OrderTest1 and OrderTest2 and need to be able to validate the data from OrderTest1 before passing to...
5
by: ChrisR | last post by:
Hi all Ive have a Main Form with Command Buttons down the Left hand side, that open various forms. Clicking on a button opens a Sub Form which is moved to take up 3/4s of the right of the main...
1
by: michael.garcia2 | last post by:
I have a form in (Access 2002 File Format) that has 61 combined Text boxes, Combo boxes, and List boxes... 11 of those fields are in the Form Header, the rest are in the Detail area... I also have...
1
by: John Phelan-Cummings | last post by:
When I add the name of a new individual in a, bound form, it will not display that persons name in a label control of a second unbound form. I have a scheduling program that I am working on. ...
9
by: MikeB | last post by:
Hi, I'd appreciate some help, please. I'm writing a VS2005 VB project for school and one of the requirements is that every screen should have a "Help" button. I could do it by writing a clumsy...
1
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is...
1
by: mirandacascade | last post by:
1) Module1 has the following delcaration: Public g_frmZZZ as Form Public g_txtForm2 as Variant 2) app has two forms: form1 and form2 3) a command button on form1 opens form2; it also has...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
3
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that...
4
by: zufie | last post by:
I have a main form containing a command SEND button that prompts an email form to pop up. The email address(es) that are supposed to appear on the email form are those corresponding to the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.