How to close all child (modal) dialogs

Hi,

I have a modal dialog1 that displays another modal dialog2, which in turn
can display another dialog3, etc.
In my application it is possible that dialog1 gets a user defined windows
message.
In this message handler he may conclude to close all the child windows
(dialog2, dialog3, etc.).
I'm using EnumChildWindows, but it doesn't seem to work.

So I have something like this:

// Callback function for EnumChildWindows
BOOL CALLBACK EnumCloseDialog(HWND hwndChild, LPARAM lParam)
{
    PostMessage(hwndChild,WM_CLOSE,0,0);
    // CloseWindow(hwndChild) doesn't work either,
    // it's like this WM_CLOSE message never arrives
    return TRUE;
}

// User pressed the something button
void CDialog1::OnButtonSomething()
{
    CDialog2 Dlg(this); // Setting this as the parent
    Dlg.DoModal();
}

LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
{
    if (m_bCloseAllChildren)  EnumChildWindows(m_hWnd,EnumCloseDialog,0);
    // Nothing happens, dialog 2 doesn't disappear!
}

What am I doing wrong?

Colin B


0
colinovic (4)
2/4/2004 11:11:39 AM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
2587 Views

Similar Articles

[PageSpeed] 33

> What am I doing wrong?
Try pDlg2->EndDialog(IDOK) or pDlg2->EndDialog(IDCANCEL) don't even need
CDialog1::OnSomeMessage() or EnumCloseDialog()...

Another thing is that if these child windows with WS_CHILD and not normal
popup windows with WS_POPUP, your child Dlg should be killed automatically
when your main dlg in kill cause of WS_CHILD as if you had a button ctrl and
not a child dlg...


0
bj7lewis (91)
2/4/2004 1:48:45 PM
OK, my dialogs all have the popup style, so trying to get to them using
EnumChildWindows was a bad idea.
If I use EnumWindows instead the code succeeds in killing dialog 2.
However, if dialog 2 is also showing a dialog 3 then this dialog is not
closed.
This probably is because it's not owned by dialog1 but by dialog2.
I would have thought that when posting the WM_CLOSE message shortly
thereafter
the code would exit dialog2.DoModal() (see below) and after exiting the
function scope
dialog2 would be deleted and thus dialog3 automatically also.
This is however not the case.

// Callback function for EnumWindows
BOOL CALLBACK EnumEndOwnedDialog(HWND hwndChild, LPARAM lParam)
{
    HWND hWndOwner = (HWND)lParam;

    // Owner match?
    if (GetWindow(hwndChild,GW_OWNER) == hWndOwner)
    {
        // Close the dialog
        PostMessage(hwndChild,WM_CLOSE,0,0);
    }
    return TRUE;
}

// User pressed the something button
void CDialog1::OnButtonSomething()
{
    CDialog2 Dlg;
    Dlg.DoModal(); // Code hangs here untill dialog3 is closed by the user
}

LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
{
    if (m_bCloseAllChildren)  EnumWindows(EnumEndOwnedDialog(LPARAM)m_hWnd);
}



0
colinovic (4)
2/4/2004 4:48:27 PM
Important......I don't even know if it is possible for your parent window to
get a message while it has a modal dialogbox open.

But anyway, I would do this,  I would declare the Dialog2 variable in my
class definition.  that way you have access to it all through out your class
and then when ever the message comes through to get rid of things then
simply call m_Dialog.OnOK(), or m_Dialog.EndDialog()... or whatever other
means which you want to close the dialog. Now you can do the same thing in
the child dialog.
I would look into modeless if I were you. If you have more than one dialog
at the same level (which you won't if you are using Modal dialogs), you can
use a CPtrArray to hold the list of the dialog variables.


 // User pressed the something button
 void CDialog1::OnButtonSomething()
 {
     m_Dlg.DoModal();
 }

 LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
 {
     if (m_bCloseAllChildren)
    {
        m_Dlg.SendMessage(WM_CLOSE);        //for modeless
        or simply
        m_Dlg.OnOK();                                        //for modal
    }
 }

Ali R.




"Colin Bouckaert" <colinovic@hotmail.com> wrote in message
news:40212211$0$317$ba620e4c@news.skynet.be...
> OK, my dialogs all have the popup style, so trying to get to them using
> EnumChildWindows was a bad idea.
> If I use EnumWindows instead the code succeeds in killing dialog 2.
> However, if dialog 2 is also showing a dialog 3 then this dialog is not
> closed.
> This probably is because it's not owned by dialog1 but by dialog2.
> I would have thought that when posting the WM_CLOSE message shortly
> thereafter
> the code would exit dialog2.DoModal() (see below) and after exiting the
> function scope
> dialog2 would be deleted and thus dialog3 automatically also.
> This is however not the case.
>
> // Callback function for EnumWindows
> BOOL CALLBACK EnumEndOwnedDialog(HWND hwndChild, LPARAM lParam)
> {
>     HWND hWndOwner = (HWND)lParam;
>
>     // Owner match?
>     if (GetWindow(hwndChild,GW_OWNER) == hWndOwner)
>     {
>         // Close the dialog
>         PostMessage(hwndChild,WM_CLOSE,0,0);
>     }
>     return TRUE;
> }
>
> // User pressed the something button
> void CDialog1::OnButtonSomething()
> {
>     CDialog2 Dlg;
>     Dlg.DoModal(); // Code hangs here untill dialog3 is closed by the user
> }
>
> LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
> {
>     if (m_bCloseAllChildren)
EnumWindows(EnumEndOwnedDialog(LPARAM)m_hWnd);
> }
>
>
>


0
nospam7515 (2086)
2/4/2004 4:59:19 PM
Apparently it is possible for the parent window to get a message while it
has
a modal dialogbox open (or I ate too many mushrooms).
OnOK() is a protected member of CDialog so I can't use that, but EndDialog()
is not.
....
Sadly this method results in the same behaviour.
Upon calling Dialog2::EndDialog() from within the message handler Dialog2
dissapears
but Dialog3 stubbornly stays shown untill it is ended by the user and then
the code comes
out of Dialog2::DoModal().

Colin B.

"Ali R." <nospam@nospam.com> wrote in message
news:Hx9Ub.58$CJ1.33414203@newssvr11.news.prodigy.com...
> Important......I don't even know if it is possible for your parent window
to
> get a message while it has a modal dialogbox open.
>
> But anyway, I would do this,  I would declare the Dialog2 variable in my
> class definition.  that way you have access to it all through out your
class
> and then when ever the message comes through to get rid of things then
> simply call m_Dialog.OnOK(), or m_Dialog.EndDialog()... or whatever other
> means which you want to close the dialog. Now you can do the same thing in
> the child dialog.
> I would look into modeless if I were you. If you have more than one dialog
> at the same level (which you won't if you are using Modal dialogs), you
can
> use a CPtrArray to hold the list of the dialog variables.
>
>
>  // User pressed the something button
>  void CDialog1::OnButtonSomething()
>  {
>      m_Dlg.DoModal();
>  }
>
>  LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
>  {
>      if (m_bCloseAllChildren)
>     {
>         m_Dlg.SendMessage(WM_CLOSE);        //for modeless
>         or simply
>         m_Dlg.OnOK();                                        //for modal
>     }
>  }
>
> Ali R.
>
>
>
>
> "Colin Bouckaert" <colinovic@hotmail.com> wrote in message
> news:40212211$0$317$ba620e4c@news.skynet.be...
> > OK, my dialogs all have the popup style, so trying to get to them using
> > EnumChildWindows was a bad idea.
> > If I use EnumWindows instead the code succeeds in killing dialog 2.
> > However, if dialog 2 is also showing a dialog 3 then this dialog is not
> > closed.
> > This probably is because it's not owned by dialog1 but by dialog2.
> > I would have thought that when posting the WM_CLOSE message shortly
> > thereafter
> > the code would exit dialog2.DoModal() (see below) and after exiting the
> > function scope
> > dialog2 would be deleted and thus dialog3 automatically also.
> > This is however not the case.
> >
> > // Callback function for EnumWindows
> > BOOL CALLBACK EnumEndOwnedDialog(HWND hwndChild, LPARAM lParam)
> > {
> >     HWND hWndOwner = (HWND)lParam;
> >
> >     // Owner match?
> >     if (GetWindow(hwndChild,GW_OWNER) == hWndOwner)
> >     {
> >         // Close the dialog
> >         PostMessage(hwndChild,WM_CLOSE,0,0);
> >     }
> >     return TRUE;
> > }
> >
> > // User pressed the something button
> > void CDialog1::OnButtonSomething()
> > {
> >     CDialog2 Dlg;
> >     Dlg.DoModal(); // Code hangs here untill dialog3 is closed by the
user
> > }
> >
> > LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
> > {
> >     if (m_bCloseAllChildren)
> EnumWindows(EnumEndOwnedDialog(LPARAM)m_hWnd);
> > }
> >
> >
> >
>
>


0
colinovic (4)
2/5/2004 9:13:43 AM
I've found a solution by using a recursive method!
Tweaked the callback function...

BOOL CALLBACK EnumEndOwnedDialogs(HWND hWnd, LPARAM lParam)
{
    // Get the handle of the owner
    HWND hWndOwner = (HWND)lParam;

    // Owner matches?
    if (GetWindow(hWnd,GW_OWNER) == hWndOwner)
    {
        // Close his own dialogs -- this is were the whole thing becomes
recursive
        EnumWindows(EnumEndOwnedDialogs,(LPARAM)hWnd);

        // Close the dialog
        PostMessage(hWnd,WM_CLOSE,0,0);

        // Stop enumeration, don't do this if multiple owned dialogs are
possible
        return FALSE;
    }

    // Continue enumeration
    return TRUE;
}

Thanks for all the tips leading me here.
Colin B.

"Colin Bouckaert" <colinovic@hotmail.com> wrote in message
news:402208f7$0$767$ba620e4c@news.skynet.be...
> Apparently it is possible for the parent window to get a message while it
> has
> a modal dialogbox open (or I ate too many mushrooms).
> OnOK() is a protected member of CDialog so I can't use that, but
EndDialog()
> is not.
> ...
> Sadly this method results in the same behaviour.
> Upon calling Dialog2::EndDialog() from within the message handler Dialog2
> dissapears
> but Dialog3 stubbornly stays shown untill it is ended by the user and then
> the code comes
> out of Dialog2::DoModal().
>
> Colin B.
>
> "Ali R." <nospam@nospam.com> wrote in message
> news:Hx9Ub.58$CJ1.33414203@newssvr11.news.prodigy.com...
> > Important......I don't even know if it is possible for your parent
window
> to
> > get a message while it has a modal dialogbox open.
> >
> > But anyway, I would do this,  I would declare the Dialog2 variable in my
> > class definition.  that way you have access to it all through out your
> class
> > and then when ever the message comes through to get rid of things then
> > simply call m_Dialog.OnOK(), or m_Dialog.EndDialog()... or whatever
other
> > means which you want to close the dialog. Now you can do the same thing
in
> > the child dialog.
> > I would look into modeless if I were you. If you have more than one
dialog
> > at the same level (which you won't if you are using Modal dialogs), you
> can
> > use a CPtrArray to hold the list of the dialog variables.
> >
> >
> >  // User pressed the something button
> >  void CDialog1::OnButtonSomething()
> >  {
> >      m_Dlg.DoModal();
> >  }
> >
> >  LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
> >  {
> >      if (m_bCloseAllChildren)
> >     {
> >         m_Dlg.SendMessage(WM_CLOSE);        //for modeless
> >         or simply
> >         m_Dlg.OnOK();                                        //for modal
> >     }
> >  }
> >
> > Ali R.
> >
> >
> >
> >
> > "Colin Bouckaert" <colinovic@hotmail.com> wrote in message
> > news:40212211$0$317$ba620e4c@news.skynet.be...
> > > OK, my dialogs all have the popup style, so trying to get to them
using
> > > EnumChildWindows was a bad idea.
> > > If I use EnumWindows instead the code succeeds in killing dialog 2.
> > > However, if dialog 2 is also showing a dialog 3 then this dialog is
not
> > > closed.
> > > This probably is because it's not owned by dialog1 but by dialog2.
> > > I would have thought that when posting the WM_CLOSE message shortly
> > > thereafter
> > > the code would exit dialog2.DoModal() (see below) and after exiting
the
> > > function scope
> > > dialog2 would be deleted and thus dialog3 automatically also.
> > > This is however not the case.
> > >
> > > // Callback function for EnumWindows
> > > BOOL CALLBACK EnumEndOwnedDialog(HWND hwndChild, LPARAM lParam)
> > > {
> > >     HWND hWndOwner = (HWND)lParam;
> > >
> > >     // Owner match?
> > >     if (GetWindow(hwndChild,GW_OWNER) == hWndOwner)
> > >     {
> > >         // Close the dialog
> > >         PostMessage(hwndChild,WM_CLOSE,0,0);
> > >     }
> > >     return TRUE;
> > > }
> > >
> > > // User pressed the something button
> > > void CDialog1::OnButtonSomething()
> > > {
> > >     CDialog2 Dlg;
> > >     Dlg.DoModal(); // Code hangs here untill dialog3 is closed by the
> user
> > > }
> > >
> > > LRESULT CDialog1::OnSomeMessage(WPARAM, LPARAM)
> > > {
> > >     if (m_bCloseAllChildren)
> > EnumWindows(EnumEndOwnedDialog(LPARAM)m_hWnd);
> > > }
> > >
> > >
> > >
> >
> >
>
>


0
colinovic (4)
2/5/2004 12:26:00 PM
> Apparently it is possible for the parent window to get a message while it
> has a modal dialogbox open (or I ate too many mushrooms)...
This is cause you have only one MSG loop that is in your CWinApp obj and
when your dlg's current running handler is done the execution returns to the
MSG loop and is ready to get the next MSG. This is how your dlg processes
it's own msg to stay alive and how the GUI of main window stays painted in
the event to a much needed repainting...


0
bj7lewis (91)
2/5/2004 1:47:32 PM
Reply:

Similar Artilces:

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...

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...

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 ...

Modeless Dialog
I have a modeless dialog created in MFC. The dialog will be performing intensive processing for a period of time and updating progressbar controls within itself. When I launch the modeless dialog, its starts its processing but never updates the display or handles window events (e.g. moving the dialog). My guess is the dialog cannot handle window events if it is crunching away in a loop. What is the best means to accomplish this scenario? I'm trying to avoid threading, but should I use a worker thread? Do modeless dialogs have a seperate thread for messaging and processing already impl...

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...

custom views dialog box
Hi. What exactly is the point of the custom views dialog box (found under view menu). When I access it, there is nothing listed under 'view'. Is this supposed to be a list of all the worksheets? This is where you add your views (using the Add button). A view contains your current setup of hidden/unhidden rows/columns, filter settings, ... Once added and they are on the list for you to recall at a click. HTH. Best wishes Harald "Wessel" <Wessel@discussions.microsoft.com> skrev i melding news:1B25C374-CC16-411D-9D50-7FA4CC6CE15D@microsoft.com... > Hi. What exact...

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...

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. ...

Tooltips for a toolbar in a dialog box
I have placed a toolbar in a dialog box. How do I get tooltips to appear? Use the style: CBRS_TOOLTIPS when you create the toolbar. Tom "William Gower" <w_gower@hotmail.com> wrote in message news:%23qb604yIEHA.1944@TK2MSFTNGP11.phx.gbl... > I have placed a toolbar in a dialog box. How do I get tooltips to appear? > > ...

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...

Permissions / Closing MDB left open
I need to learn how to create - well, I'm not actually sure what I need to learn... Let me explain: I'm a surgical resident. I've been working on an Access MDB as a patient census - for day-to-day management including tables, queries, and forms that print based on room number or service. Everything is setup as needed in the local file. I've been working on the content of the database on and off for a year. Recently, before I can implement my project, I realized I have a very big challenge to overcome related to usage of the file. Now, to complicate my iss...

Closed account not so closed?
Hi All... I have (had) an investment account with E*Trade, which I have since closed. In MS Money 2006, I have it as "Account Is Closed", in the account list. There are a few weird things going on: 1. When I go into the account list, this account appears in gray with $0.00 next to it, but the "To Review" column has "Update in Progress" in it. This account is definately not part of my regular online updates (though when it was active, it was). 2. When I click into this account, 2 securities are listed. Neither one of them has Quantity or Cost Basis,...

when closing outlook favourite files disappear
When I create a favourite file by right clicking it creates ok and appears in the favouites section. After closing and reopening outlook the file disappears from the favourites section Bummer! -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. How to ask a question: http://support.microsoft.com/KB/555375 "ceh" <ceh@discussions.microsoft.com> wrote in message news:9C6E3908-E47D-4398-B12F-376AC9A7A8F8@microsoft.com... > When I create a favourite file by right clicking it creates ok and appears > in > the favouites sec...

Closing Excel #2
I have inherited an App desigend by an ex employee Sometimes the program leaves Excel in the task manager The programe uses various routines and calling various functions that define Excel sheets etc (badly named) I'm finding it hard to follow (my 1st experince of .NET) is there a way to KILL any Excel instence when exiting the program. I have come across some posts about GC (garbage collection) like this System.Runtime.InteropServices.Marshal.ReleaseComObject(oXLWsheet) oXLWsheet = Nothing 'System.Runtime.InteropServices.Marshal.ReleaseComObject(oXLWs) oXLWs = Nothing oBook.Clos...

Messages Close When Outlook Closes
Our company has recently upgraded to Outlook 2003 from 2000. 2003 has one very annoying feature that was not present in 2000: When the main Outlook program is closed, any open messages are also closed. 2000 would allow the messages to remain open when Outlook closed. Is this change by design, by oversight or by error? Is there some hidden registry tweak to change this behavior? Heck, even Outlook Express will allow messages to remain open when the program is closed! Jerry Are you using Word as the editor? If so, they might stay open... note that Outlook 2000 didn't allow it - it ...

Inventory Year End Close Should Display Last Close Date
I have run into several clients that have accidentally closed their inventory module twice. I suggest that the Inventory Year End Close window display the 'Last Closed Date' on it so that users can easily see when the inventory module has been closed. This will reduce the number of support calls. ---------------- 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 button, follow this link to open the suggestion in the ...

Double Buffering in Dialogs
I'm trying to double buffer my dialog as it flickers horribly while resizing. Does any one know how to do this. Any code will be appreciated. Thanks in advance. Wasif Ali Wasif Ali wrote: > I'm trying to double buffer my dialog as it flickers horribly while > resizing. > Does any one know how to do this. > Any code will be appreciated. > > Thanks in advance. > > Wasif Ali What's in the dialog that makes it flicker? The dialog has an ActiveX control and the ActiveX control has many Botmap Buttons on it. Wasif Ali "Minus" <pakosan@ya...

Multiple workbooks open -- closing workbooks
Dear Clever People, I hope this is not the "silly question of the day". We were wondering (when you have multiple workbooks open and you close one workbook) why are all other workbooks forced to be closed, too? Is it possible to ever close one workbook and leave all the others open? Thank you, Janet Close it by going to file>close or by pressing Ctrl + F4 or by clicking the smaller X below the big red X -- Regards, Peo Sjoblom "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in message news:1C9BC30B-BE1A-4605-B215-99C07CB1D366...

Bulk Email to Closed Leads
(MS CRM 3.0) I am not sure if I am loosing my mind or if this really isn't possible. I need to send an email to 250 of my closed leads. I created a marketing list of the leads and a quick campaign for the email but all emails failed with an error something about being blocked by the bulk email. I spot checked the lead's preferences and they all allow bulk email. Do I need to reactivate these leads to do this since you can't create an activity for a closed lead? If so, does anyone have any ideas on how to do this easily? what is the issue if you make them active and send...

Closing Opportunity
When you close an Opportunity, you can set the Status "Won" or "Lost." Based on what you select, it populates a drop-down list, Status Reason, right beneath it. How can I add my own options to this drop-down? Keith From Home, go to Settings>System Customization>Opportunities>Customize Form Click on the detail tab, then double click the Status Reason field. Add your own options from the value tab krschacht@hotmail.com (Keith) wrote in message news:<280caed6.0307091545.753caf87@posting.google.com>... > When you close an Opportunity, you can set the St...

DoCmd.Close not closing form
I'm trying to automatically close a popup form (frmSearch), when the user clicks on a control in a continuous subform (frmSearchResults). My DoCmd.close statement appears to be doing nothing as the popup form stays open. Any ideas? Thank you. ### Private Sub Pt_LName_Click() Dim rs As Object Set rs = Forms!frmPatients.Recordset.Clone Forms!frmPatients.SetFocus rs.FindFirst "[PatientID] = " & Me.PatientID If Not rs.EOF Then Forms!frmPatients.Bookmark = rs.Bookmark ' Problem persists even if I delete this line or ' swap the order of thi...