Close two forms at once?

I have two forms that open up in succession and stay visible together as part 
of my invoice creation process.
When we have finished editing the second form, I want to have a single Close 
button that will close both forms with one click.
Assuming that we're talking about Form1 and Form2, how would I code this, 
please?
Many thanks
CW
0
Utf
12/11/2007 11:44:02 PM
access.forms 6864 articles. 2 followers. Follow

4 Replies
590 Views

Similar Articles

[PageSpeed] 29

Private Sub CloseTwoForms_Click()
    DoCmd.Close acForm, "Form1"
    DoCmd.Close acForm, "Form2"
End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1

0
Linq
12/12/2007 12:08:02 AM
Private Sub CloseTwoForms_Click()
    DoCmd.Close acForm, "Form1"
    DoCmd.Close acForm, "Form2"
End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

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

0
Linq
12/12/2007 12:08:33 AM
Private Sub CloseTwoForms_Click()
    DoCmd.Close acForm, "Form1"
    DoCmd.Close acForm, "Form2"
End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1

0
Linq
12/12/2007 12:09:14 AM
Sorry! Got to do something about this stutter!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1

0
Linq
12/12/2007 12:10:35 AM
Reply:

Similar Artilces:

How to Enable Close(cross) button of MB_YESNO messagebox
Hi, I want to enable the close(cross) button in the right corner of YESNO message box. Can anybody tell me how to do this. Klic. "Klic" <rohit.turambekar@gmail.com> wrote in message news:1186120969.045121.287770@i13g2000prf.googlegroups.com... > I want to enable the close(cross) button in the right corner of YESNO > message box. > Can anybody tell me how to do this. Why? If there is a valid answer other than yes or no, then how about a yes/no/cancel message box in which (I would guess) the x button is equivalent to cancel. That would be more standard. Da...

Link two subforms
I have a main form listing "Customers", a Subform_1 containing "Orders" and another Subform_2 containing "Order Details". Obviously Subform_2 needs to link to Subform_1 using the common OrderID field, but when I use something like "=Subform_1.Form!OrderID" in the Link Master Fields property of Subform_2, it doesn't work. What am I missing? Just put 'OrderID' (without single quotes) in Master and Child link fields. Steve "Mitch Powell" wrote: > I have a main form listing "Customers", a Subform_1 containing &quo...

Urgent help: change outlook default conatct form
Hi all, We added several fields to contacts in the standard form (design mode). We want this form to become users' default conatct form. Also, old contacts are able to launch from this new customized form. are these possible? exchange 2003/outllokk2003/outlook 2007) Yes. This is possible. You need to change the form on the folder properties and then run a program to change the IPM form used on existing items. See the last two sections at http://www.outlook-tips.net/beginner/publish_form.htm for details and link to the program. -- Diane Poremsky [MVP - Outlook] ...

Syncronizing Outlook Express on two computers????
Hi, I need to sycronize all recieved mail on two networked PCs. Any suggestions on how I would go about doing that? If I could somehow keep the messages on my online server so that both computers would access the same emails.....? I also thought there might be a possibility to make all messages received on one PC be sent through the network to some folder on the other PC, which Outlook Express there could then access. Any help would be greatly appreciated. Thanks, Phil My email is philiprogers@direcway.com ...

ThisWorkbook.Close question
Please take a look at the code below: Public Sub DumbFoo ( ) ThisWorkbook.Close() Sheet1.Range("A1").Value = -1 ThisWorkbook.Save() End Sub Is it safe to assume that the code below the "ThisWorkbook.Close()" line will NOT be executed??? My question is basically: Does all VBA code stop executing once a .Close() function is called??? Thank you! I don't believe the code would execute at all because of the parentheses after Close. It would throw an error an tell you that something is missing, or type mismatch. But, if you did...

Two bachelors
Two confirmed bachelors sat talking. Their conversation drifted from politics to cooking. "I got a cookbook once," said the first, "but I could never do anything with it." "Too much fancy cooking in it, eh?" asked the second. "You said it. Every one of the recipes began the same way - 'Take a clean dish and....'" 'xanax pills' (http://orderxanax.qweeew.info/xanax-pills.html) 'silver anklets' (http://anklets.rtart.info/silver-anklets.html) -- SerialModel -----------------------------------------------------------------...

OWA forms
Hello, I have over 300 OWA users who wish to have the capability to request vacation time using a form similar to outlook vacation form using OWA, Is this possible? and if so, is there a procedure or an example I can follow to create such forms? Thank you in advance. That's not an Outlook question, I'm afraid, since desktop Outlook forms = do not translate to OWA at all. Exchange development docs start at = http://msdn.microsoft.com/exchange/ with discussions in the = microsoft.public.exchange.development newsgroup or on the Web at = http://forums.microsoft.com/TechNet/ShowForu...

Outlook closes and closes
Hi I have a strange bug. Windows XP Sp2 and outlook from office 20003 with all service packs applied. When I start outlook from windows out of standby postion, outlook immediately after the splash screen closes without reporting any errors in the eventlog or in any other log. If I start outlook the 10th time (or so) it stabilizes and does not close anymore and everything works again. info: My machine is fully patched and I am well known with keeping things healthy. Outlook.exe Version: 11.0.6353.0 Any ideas what to do? Thanks... try the detect and repair in the help menu. >----...

closing
What's the best way to close for the day? Making a backup is a given, but what about the computer? Is it better to shut everything off every day, or is it less wear and tear on the computer to leave it on all the time? Any thoughts on this would be appreciated. Craig That's a matter of preference really. Personally I always turn off my rigs at home when I'm done with them. At the store we leave most of ours on 24/7. We've done it for years with no issues. Our register must be left on as it does automatic backups to a tape drive every night. I'd set your monitors ...

Seeing Two instances of the Data File in the TRee!
I am sorry for the obscure Subject line, but I can't think of a way to describe this. I am using Outlook with regular Internet Email. I have it set up with the standard one Data File. When I go to the Data Files page, there is only one file in use. But.. In the Tree on the Left (in Office 2003) I see 2 personal Folders (of the Data File) and they are exactly the same thing, when I get new email, both inboxes receive the file. Also, when I go to the Email Accounts page, and I want to choose which Data File to direct the emails to, it shows 2 options, both having the same name (Duh, ...

Forms to Public Folder from other Organization are blank
Our company has two Exchange organizations (don't ask). Organization A has forms published in the Organizational Forms Library. Organization B does not. User A moves from Org A to Org B and wants to use a form they have used before in Org A. This form posts to a public folder in Org A. Since the form is not published in Org B they use a form that was previously forwarded to them and then forward it back to the public folder. However, when it arrives at the public folder there is no form and the email is blank. If the same form is forwarded to a user or DL in Org A, it shows up as ex...

Help
When creating or fowarding an e-mail message using outlook 2000, scrolling through my "recipients" list (contacts) causes the program to close unexpectedly. So, I click "new", click "to", switch to my "contacts" list, and as I scroll through the names, the program just closes. Is there a possibility that one of my contact records is corrupt? I have opened all of my contacts and saved them without an error. This problem developed shortly after the install of Office 2000's calender update, and basic security update. I have since fully u...

Excel Form and message box
Hi there, I'm running Excel 2000. I am just learning so please excuse my questions if they sound simple. To put this as simply as possible I have a spreadsheet of children's names. I've created a form that is activated by a control button. What I want to do is choose a child's name from the combo box and eventually delete that child from the spreadsheet. I have an "are you sure" type msgbox but cannot get the yes/no side of it functioning correctly. I've worked on this for hours and have just given up. This is my code so far: Private Sub cboRemChild_...

two views & splitter in separate CChildFrame
Hello i created CChildFrame2 class and in it: BOOL CChildFrame2::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext) { if (!s.CreateStatic(this,1,2)|| !s.CreateView(0,0,RUNTIME_CLASS(CTestView2),CSize(128,0),pContext)|| !s.CreateView(0,1,RUNTIME_CLASS(CTestView3),CSize(0,0),pContext)) return FALSE; return TRUE; } and in CTestApp: CMultiDocTemplate* pDocTemplate2= new CMultiDocTemplate( IDR_TESTDTYP, RUNTIME_CLASS(CTestDoc), RUNTIME_CLASS(CChildFrame2), RUNTIME_CLASS(???)); /*which view should i use here ? */ I want to have window with splitter with two views (CTestView2 and ...

Workflow Rule -> Closing Activity
I set up a Manual Workflow Rule for Contacts to close out Holiday Season cards sent. The rule uses a condition to check for Contacts with cards sent and then Creates an Activity to add to each of the appropriate Contacts for future reference. What else do I need to do to close out all of activites rather than 1 at a time? Here is the workflow rule if that helps: if Contact.holidaycardlist = 1 then Letter: Send Holiday Card endif -- Dan W Systems Engineer Denver, CO ...

Auto-close Quotes when Closing Opportunity
We would like the ability to close an opportunity and have it ask if you want to close all the associated quotes. Right now, it says you can’t close the opp until you close all the open quotes and you have to each one of those one by one. Barring that, if we could select multiple quotes and click on a menu item (Close all selected quotes), that would be most useful. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not ...

Data file not closed properly #3
I saw several post regarding this, but none had any answers, so I starting a new post. There is also nothing in the KB about this. Since othe people are having the same problem Microsoft should take a look at it. I get the message "The data file 'Personal Folders" was not closed properly" every time I close Outlook 2003. It runs a quick check/fix and starts up fine. I am running XP pro w/ SP-2. Outlook 2003 w/ SP-1 All patches and updates are current. My notebook was just rebuilt for so I could get a clean slate for the office 2003 install, (reformat drive and new ins...

Outlook2003 open and closed immediatly
I checked event log, nothing. And this happened when I just reboot my machine and first time tried to open Outlook, still same problem. But I found, when I double click anywhere in the Outlook Windows even it only gave me 0.5 second, then it won't close. Andy -------------------------------------------------------------- >>Look in task manager - processes, and see if multiple >>instances are running. If so, end all of them and try >>starting again. I had similar problem w/user, posted >>above. >>>>>-----Original Message----- >>>>>My O...

double-click to new form in Access 2003
An application (which I am not familiar with) was written in Access 2002. There is a form with a subform where double-clicking on a row is supposed to go to another form using the information from the selected row in the subform. The user's Access has been upgraded to Access 2003 and double-clicking now brings him to an empty form rather than the next form according to the fields of the selected row. I have Access 2002. However on my computer, double-clicking doesn't do anything. The Action on On Dbl Clk on the fields in the Details section of the subform of the main form is OpenF...

Outlook Closes After Closing an Email
When I click the 'X' to close an email after reading it, Outlook closes (or tries to close, but I get a warning because I have templates in my Outbox). This only seems to happen when I close a new email. I have Outlook 2003. Thank you. ...

Display Count of records from subform on Main form
I need to show a count of records for doc on main form. Doc info is on main form and list of pts is on subform. I have entered an unbound text box on the main form and have tried DCount, ABSSum and Count all I get is 0. This is what I have entered: =DCount([ID]) or ABS(Sum([myfrom].[ID]) and =Count([ID]). Thank you in advance for any help you can provide. Thank you. Try it this way: Create a query with the needed table. Add the id-field to the grid. Total it by Count. Save the query and on the form you place an unbound field. In VBA you can do a Dlookup for the one field in the q...

Divide two cells and if the number is negative display is as zero
I have an excell spread sheet and i am dividing two cells. Most of the numbers are positve but some of the numbers are negative. I want to put a formula in to all the cells that will divide the two cells and give me the answer to one digit but if the number is negative i want it to display as 0. Maybe something like this... =MAX(0,ROUND(A1/A2,1)) -- Biff Microsoft Excel MVP "mike" <mike@discussions.microsoft.com> wrote in message news:74196BD1-586C-47B9-BAFE-C0D895666B9A@microsoft.com... >I have an excell spread sheet and i am dividing two cells. Mos...

YE Closing Procedures
The year end closing procedures need to be more efficient and user friendly. For example, the payables and receivable management is date sensitive except for amounts since last close, vendor yearly summary etc. These modules should be fully date sensitive and the ability to enter into multiple years without caveats should exist. Year end is stressful enough ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the b...

combo box on form to update different table
Access 2000, Windows2000 Several tables: ratings has fields: TrxID*, name, id, game, and shift, plus 20 others customers has fields: Cname,Cid, StAdd, City, and so on GAmes includes fields: name* Shift includes fields: shiftname* I have created a form to update the ratings table. problem fields on this form are lookups I want the name field to allow selection form those entries in the customer table and display the selected name and ID in two separate fields on the form, the ID should then be stored in the ratings table. The name( on the form is for user input selection only) since it...

HELP
If anybody can help with this problem in Excel 2003 I will SURELY appreciate it! I have a list of 10,000 names in list #1. Each piece of information is broken down into its own column (First Name, Last Name, Company Name, Company Address, etc.) as it was exported out of Maximizer Enterprise in Lotus Notes. I imported this information into Excel. List #2 is a list of 5000 of the same names, but these names are those of list 1 that do NOT have email addresses. These are the people we postal mail information to. What I have to have is list #2 subtracted completely from list #1, which will leav...