Application.Quit / DoCmd.Quit Fails

Greetings:

I was looking at the task manager and just noticed that Access isn't
really closing when I exit my application. One copy of Access shows up
in the processes list for each time I open and close the application.
(It doesn't appear in the applications list.)

I've read dozens of posts about the merits of DoCmd.Quit v.
Application.Quit, closing recordsets and setting their variables =
Nothing. No matter what I do, Access remains open in the background.
Here are the significant parts of my code:

Private Sub cmdQuit_Click()
    DoCmd.Close acForm, "frmMenuMain", acSaveYes
End Sub

    On Error Resume Next
    gstrSQL = "DELETE * FROM tblCurrUserProj" _
        & " WHERE strUserID = """ & fOSUserName() & """;"
    DoCmd.SetWarnings False
    DoCmd.RunSQL gstrSQL
    DoCmd.SetWarnings True
    Dim AnObj As Object

    'Close all forms
    For Each AnObj In Application.Forms
        DoCmd.Close acForm, AnObj.Name
    Next
    'Close all reports
    For Each AnObj In Application.Reports
        DoCmd.Close acReport, AnObj.Name
    Next
    'Close all modules
    For Each AnObj In Application.Modules
        DoCmd.Close acModule, AnObj.Name
    Next

    'Close any possible object variables.
    Set AnObj = Nothing
    Set rs = Nothing

'In case the OS needs to do something...
'Tried with and without
    DoEvents

    DoCmd.Quit acQuitSaveAll  'Tried prompt, too.

End Sub

Is there any way to tell programatically if I have any latent object
variables? If so, how? (Nothing shows up in the locals window.)

Is it possible to set object variables to Nothing outside their scope.
(I suspect not, but since they persist, I thought I'd ask.)

I have 3 hunks of code that I didn't write, and I'm reluctant to start
messing with them. (MouseHook changes scrolling behavior, GetWinUser
gets the currently logged in user, and QBSDK retrieves data from
QuickBooks.) I assumed they were well behaved, but maybe not.

Isn't there any way to just tell Access, "Whatever you think you're
doing, stop right now and exit?" TIA.

Keith

P.S. Did I mention the boss is expecting this at lunch time?

0
Keith
6/4/2007 4:53:42 AM
access.formscoding 7493 articles. 0 followers. Follow

15 Replies
1444 Views

Similar Articles

[PageSpeed] 11

Hi Keith. Some things to try:

What version of Access is this?

To close any open forms/reports, you need to loop *backwards* through the 
collection, e.g.:
    For i = 0 to Forms.Count -1
        Docmd.Close acForm, Forms(i).Name
    Next

Do you have any class modules? Do you need to explicitly destroy any 
instances of things you instantiated?

Does it make any difference if you temporarily remove those external 
libraries? (Substitute a function in a standard module that takes the same 
arguments. It doesn't have to do anything.)

If that doesn't work, you're down to the divide'n'conquor approach, where 
you eliminate half the things that could be causing the problem, to see if 
it still occurs. Continue do add/remove half at a time, until you pin down 
the culprit.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Keith" <kagard@gmail.com> wrote in message
news:1180932822.723071.26190@m36g2000hse.googlegroups.com...
> Greetings:
>
> I was looking at the task manager and just noticed that Access isn't
> really closing when I exit my application. One copy of Access shows up
> in the processes list for each time I open and close the application.
> (It doesn't appear in the applications list.)
>
> I've read dozens of posts about the merits of DoCmd.Quit v.
> Application.Quit, closing recordsets and setting their variables =
> Nothing. No matter what I do, Access remains open in the background.
> Here are the significant parts of my code:
>
> Private Sub cmdQuit_Click()
>    DoCmd.Close acForm, "frmMenuMain", acSaveYes
> End Sub
>
>    On Error Resume Next
>    gstrSQL = "DELETE * FROM tblCurrUserProj" _
>        & " WHERE strUserID = """ & fOSUserName() & """;"
>    DoCmd.SetWarnings False
>    DoCmd.RunSQL gstrSQL
>    DoCmd.SetWarnings True
>    Dim AnObj As Object
>
>    'Close all forms
>    For Each AnObj In Application.Forms
>        DoCmd.Close acForm, AnObj.Name
>    Next
>    'Close all reports
>    For Each AnObj In Application.Reports
>        DoCmd.Close acReport, AnObj.Name
>    Next
>    'Close all modules
>    For Each AnObj In Application.Modules
>        DoCmd.Close acModule, AnObj.Name
>    Next
>
>    'Close any possible object variables.
>    Set AnObj = Nothing
>    Set rs = Nothing
>
> 'In case the OS needs to do something...
> 'Tried with and without
>    DoEvents
>
>    DoCmd.Quit acQuitSaveAll  'Tried prompt, too.
>
> End Sub
>
> Is there any way to tell programatically if I have any latent object
> variables? If so, how? (Nothing shows up in the locals window.)
>
> Is it possible to set object variables to Nothing outside their scope.
> (I suspect not, but since they persist, I thought I'd ask.)
>
> I have 3 hunks of code that I didn't write, and I'm reluctant to start
> messing with them. (MouseHook changes scrolling behavior, GetWinUser
> gets the currently logged in user, and QBSDK retrieves data from
> QuickBooks.) I assumed they were well behaved, but maybe not.
>
> Isn't there any way to just tell Access, "Whatever you think you're
> doing, stop right now and exit?" TIA.
>
> Keith
>
> P.S. Did I mention the boss is expecting this at lunch time? 

0
Allen
6/4/2007 5:26:10 AM
Hi Allen:

Thanks for the tips. I just finished commenting out all the external
code, one module at a time, and the problem persists. Here are some
things I'm considering:

1. If I create an object variable:

Dim ctrl as Control

and then loop through controls with:

For Each ctrl in Forms!TheForm

do I need to set ctrl = Nothing?

2. Am I wrong to assume that object variables only exist if the module
in which they exist is called? That is, if I have a recordset variable
on the Budget form, but I never load the Budget form, that recordset
variable is not created. (If that's true, then I should only have to
check global variables, and those on the initial form I load.)

3. You suggested using an index to loop through the forms. Will that
work differently than the For Each construct I posted originally?

Thanks

Keith

On Jun 4, 1:26 am, "Allen Browne" <AllenBro...@SeeSig.Invalid> wrote:
> Hi Keith. Some things to try:
>
> What version of Access is this?
>
> To close any open forms/reports, you need to loop *backwards* through the
> collection, e.g.:
>     For i = 0 to Forms.Count -1
>         Docmd.Close acForm, Forms(i).Name
>     Next
>
> Do you have any class modules? Do you need to explicitly destroy any
> instances of things you instantiated?
>
> Does it make any difference if you temporarily remove those external
> libraries? (Substitute a function in a standard module that takes the same
> arguments. It doesn't have to do anything.)
>
> If that doesn't work, you're down to the divide'n'conquor approach, where
> you eliminate half the things that could be causing the problem, to see if
> it still occurs. Continue do add/remove half at a time, until you pin down
> the culprit.

0
Keith
6/4/2007 5:46:30 AM
Hi Again:

Forgot to mention, this is Access 2003.

As I continue to test, I've noticed that closing from the initial menu
form does completely close Access. However, any menu item I choose
from one of three list boxes cause Access not to close when I return
to the main menu and click exit. Is there anything about this code
that would cause that:

Private Sub lstBrowse_AfterUpdate()
    lstOverviews = Null
    lstCreateNew = Null
    LoadForm (Forms!frmMenuMain.lstBrowse)
End Sub

Public Sub LoadForm(MenuList As ListBox)
    Dim strArg As String
    Dim lngMode As Long

    Select Case CLng(MenuList.Column(2))
        Case 0  'Add mode
            strArg = "Add"
            lngMode = 0
        Case 1  'Edit mode
            strArg = "Edit"
            lngMode = 1
        Case 2  'Read only mode
            strArg = "Read"
            lngMode = 2
        Case Else
    End Select

    DoCmd.OpenForm MenuList.Column(1), acNormal, , , lngMode, , strArg

End Sub

On Jun 4, 1:26 am, "Allen Browne" <AllenBro...@SeeSig.Invalid> wrote:
> Hi Keith. Some things to try:
>
> What version of Access is this?

0
Keith
6/4/2007 5:54:02 AM
Hi Allen:

Did you mean loop backwards, as in:

For i = Forms.Count-1 to 0 Step -1

K

> To close any open forms/reports, you need to loop *backwards* through the
> collection, e.g.:
>     For i = 0 to Forms.Count -1
>         Docmd.Close acForm, Forms(i).Name
>     Next

0
Keith
6/4/2007 6:10:22 AM
You're right: I intended the loop to be Step -1.

For your example of:
    Dim ctl As Control
you should not have to explicitly use:
    Set ctl = Nothing
at the end of that procedure. Having said that, I do it anyway: guess I just 
don't trust Access to release all objects.

You also asked:
    Am I wrong to assume that object variables only exist if the
    module in which they exist is called?
It's a bit more involved than that. Basically, if you never open a form, 
then it's module is not loaded into memory, and so its objects are not 
instantiated. However, there are cases where that may not be true. For 
example, this could cause Form1's module to be loaded:
    Call Form_Form1.MyProcedure
Also, passing an object from one procedure to another can change its 
lifetime. Using the Static keyword can change its lifetime.

Now to this reply. Good: you have isolated what triggers the problem. And 
you are, in fact, passing an object to LoadForm(). If LoadForm() is in a 
different module, that could be the issue.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Keith" <kagard@gmail.com> wrote in message
news:1180936442.691966.157580@n4g2000hsb.googlegroups.com...
> Hi Again:
>
> Forgot to mention, this is Access 2003.
>
> As I continue to test, I've noticed that closing from the initial menu
> form does completely close Access. However, any menu item I choose
> from one of three list boxes cause Access not to close when I return
> to the main menu and click exit. Is there anything about this code
> that would cause that:
>
> Private Sub lstBrowse_AfterUpdate()
>    lstOverviews = Null
>    lstCreateNew = Null
>    LoadForm (Forms!frmMenuMain.lstBrowse)
> End Sub
>
> Public Sub LoadForm(MenuList As ListBox)
>    Dim strArg As String
>    Dim lngMode As Long
>
>    Select Case CLng(MenuList.Column(2))
>        Case 0  'Add mode
>            strArg = "Add"
>            lngMode = 0
>        Case 1  'Edit mode
>            strArg = "Edit"
>            lngMode = 1
>        Case 2  'Read only mode
>            strArg = "Read"
>            lngMode = 2
>        Case Else
>    End Select
>
>    DoCmd.OpenForm MenuList.Column(1), acNormal, , , lngMode, , strArg
>
> End Sub
>
> On Jun 4, 1:26 am, "Allen Browne" <AllenBro...@SeeSig.Invalid> wrote:
>> Hi Keith. Some things to try:
>>
>> What version of Access is this? 

0
Allen
6/4/2007 7:42:52 AM
Hi Allen:

LoadForm is in the same module as the sub that calls it. What's
strange is that if in this sub:

Private Sub lstBrowse_AfterUpdate()
    lstOverviews = Null
    lstCreateNew = Null
    LoadForm (Forms!frmMenuMain.lstBrowse)           ...

I replace the LoadForm call with this:
    DoCmd.OpenForm "frmBudget", acNormal

I can exit cleanly from Access, even if the menu form and the budget
form are both open. But I obviously want to select from a number of
different forms to open. So why would hard coding a specific form
eliminate the error?

I tried to elminate the call buy copying the LoadForm code directly
into the AfterUpdate event and modifying it to work specificly with
lstBrowse:

....
    Dim strArg As String
    Dim lngMode As Long

    Select Case CLng(lstBrowse.Column(2))
        Case 0  'Add mode
            strArg = "Add"
            lngMode = 0
        Case 1  'Edit mode
            strArg = "Edit"
            lngMode = 1
        Case 2  'Read only mode
            strArg = "Read"
            lngMode = 2
        Case Else
    End Select

    DoCmd.OpenForm lstBrowse.Column(1), acNormal, , , lngMode, ,
strArg


Even so, when I exit after opening the budget form, the Access process
remains in memory. I don't get it.

Allen, thanks so much for your help with this. I really appreciate it.

Keith

> Now to this reply. Good: you have isolated what triggers the problem. And
> you are, in fact, passing an object to LoadForm(). If LoadForm() is in a
> different module, that could be the issue.

0
Keith
6/4/2007 10:58:26 AM
Okay, I'm not clear about the connection between the current form and 
frmMainMenu.

But in any case, you could try:
    Dim strDoc as String
    strDoc = lstBrowse.Column(1)
    Docmd.OpenForm strDoc, , , , lngMode, ,strArg

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Keith" <kagard@gmail.com> wrote in message
news:1180954706.059161.55010@q66g2000hsg.googlegroups.com...
> Hi Allen:
>
> LoadForm is in the same module as the sub that calls it. What's
> strange is that if in this sub:
>
> Private Sub lstBrowse_AfterUpdate()
>    lstOverviews = Null
>    lstCreateNew = Null
>    LoadForm (Forms!frmMenuMain.lstBrowse)           ...
>
> I replace the LoadForm call with this:
>    DoCmd.OpenForm "frmBudget", acNormal
>
> I can exit cleanly from Access, even if the menu form and the budget
> form are both open. But I obviously want to select from a number of
> different forms to open. So why would hard coding a specific form
> eliminate the error?
>
> I tried to elminate the call buy copying the LoadForm code directly
> into the AfterUpdate event and modifying it to work specificly with
> lstBrowse:
>
> ...
>    Dim strArg As String
>    Dim lngMode As Long
>
>    Select Case CLng(lstBrowse.Column(2))
>        Case 0  'Add mode
>            strArg = "Add"
>            lngMode = 0
>        Case 1  'Edit mode
>            strArg = "Edit"
>            lngMode = 1
>        Case 2  'Read only mode
>            strArg = "Read"
>            lngMode = 2
>        Case Else
>    End Select
>
>    DoCmd.OpenForm lstBrowse.Column(1), acNormal, , , lngMode, ,
> strArg
>
>
> Even so, when I exit after opening the budget form, the Access process
> remains in memory. I don't get it.
>
> Allen, thanks so much for your help with this. I really appreciate it.
>
> Keith
>
>> Now to this reply. Good: you have isolated what triggers the problem. And
>> you are, in fact, passing an object to LoadForm(). If LoadForm() is in a
>> different module, that could be the issue. 

0
Allen
6/4/2007 1:02:44 PM
Keith <kagard@gmail.com> wrote in
news:1180935990.991887.129190@h2g2000hsg.googlegroups.com: 

> 1. If I create an object variable:
> 
> Dim ctrl as Control
> 
> and then loop through controls with:
> 
> For Each ctrl in Forms!TheForm
> 
> do I need to set ctrl = Nothing?

Michael Kaplan always recommended it, when the For Each loop has
completed. 

> 2. Am I wrong to assume that object variables only exist if the
> module in which they exist is called? That is, if I have a
> recordset variable on the Budget form, but I never load the Budget
> form, that recordset variable is not created. (If that's true,
> then I should only have to check global variables, and those on
> the initial form I load.) 

Yes, that's correct.

> 3. You suggested using an index to loop through the forms. Will
> that work differently than the For Each construct I posted
> originally? 

Well, it's more work, but it doesn't run the danger of creating an
implicit reference, as in the For Each Control question above. But I
*always* use For Each constructs for any collection, and never a
counter, except in the case where I want to loop backwards or using
some interval other than 1. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
6/4/2007 2:10:29 PM
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in
news:#Vow3vnpHHA.3368@TK2MSFTNGP02.phx.gbl: 

> For your example of:
>     Dim ctl As Control
> you should not have to explicitly use:
>     Set ctl = Nothing
> at the end of that procedure. Having said that, I do it anyway:
> guess I just don't trust Access to release all objects.

Michael Kaplan recommended it, just in case the implicit reference
to the last control was not released. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
6/4/2007 2:11:39 PM
Keith <kagard@gmail.com> wrote in
news:1180954706.059161.55010@q66g2000hsg.googlegroups.com: 

> LoadForm is in the same module as the sub that calls it. What's
> strange is that if in this sub:
> 
> Private Sub lstBrowse_AfterUpdate()
>     lstOverviews = Null
>     lstCreateNew = Null
>     LoadForm (Forms!frmMenuMain.lstBrowse)           ...
> 
> I replace the LoadForm call with this:
>     DoCmd.OpenForm "frmBudget", acNormal
> 
> I can exit cleanly from Access, even if the menu form and the
> budget form are both open.

Is the parameter for LoadForm defined as ByRef (or not declared,
which is implicitly ByRef)? Try doing it with ByVal, or with: 

  LoadForm (Forms!frmMenuMain.lstBrowse.Value)

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
6/4/2007 2:13:23 PM
Keith,

You might try using a variable fed by the list box:

Dim strFormName As String
strFormName = Forms!frmMenuMain.lstBrowse
DoCmd.OpenForm strFormName

You can also use a friendly name for the form and the actual form name is a 
second column where the width of that column is set to 0". The line of code 
would then look like:

strFormName = Forms!frmMenuMain.lstBrowse.Column(1)
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Keith" <kagard@gmail.com> wrote in message 
news:1180954706.059161.55010@q66g2000hsg.googlegroups.com...
> Hi Allen:
>
> LoadForm is in the same module as the sub that calls it. What's
> strange is that if in this sub:
>
> Private Sub lstBrowse_AfterUpdate()
>    lstOverviews = Null
>    lstCreateNew = Null
>    LoadForm (Forms!frmMenuMain.lstBrowse)           ...
>
> I replace the LoadForm call with this:
>    DoCmd.OpenForm "frmBudget", acNormal
>
> I can exit cleanly from Access, even if the menu form and the budget
> form are both open. But I obviously want to select from a number of
> different forms to open. So why would hard coding a specific form
> eliminate the error?
>
> I tried to elminate the call buy copying the LoadForm code directly
> into the AfterUpdate event and modifying it to work specificly with
> lstBrowse:
>
> ...
>    Dim strArg As String
>    Dim lngMode As Long
>
>    Select Case CLng(lstBrowse.Column(2))
>        Case 0  'Add mode
>            strArg = "Add"
>            lngMode = 0
>        Case 1  'Edit mode
>            strArg = "Edit"
>            lngMode = 1
>        Case 2  'Read only mode
>            strArg = "Read"
>            lngMode = 2
>        Case Else
>    End Select
>
>    DoCmd.OpenForm lstBrowse.Column(1), acNormal, , , lngMode, ,
> strArg
>
>
> Even so, when I exit after opening the budget form, the Access process
> remains in memory. I don't get it.
>
> Allen, thanks so much for your help with this. I really appreciate it.
>
> Keith
>
>> Now to this reply. Good: you have isolated what triggers the problem. And
>> you are, in fact, passing an object to LoadForm(). If LoadForm() is in a
>> different module, that could be the issue.
> 


0
Arvin
6/4/2007 2:26:21 PM
Keith wrote:
[snip]
>3. You suggested using an index to loop through the forms. Will that
>work differently than the For Each construct I posted originally?
>
>On Jun 4, 1:26 am, "Allen Browne"  wrote:
>> What version of Access is this?
>>
>> To close any open forms/reports, you need to loop *backwards* through the
>> collection, e.g.:


When you are closing all forms (removing all items from a
collection), it is imperitive that you avoid removing the
items in a formward direction.  If you use For Each or For i
= 0 To Forms.Count-1 , you will remove an item, which
rearranges the collection so the next item is no longer in
the same position as it was, resulting in every other item
being removed.

I think Allen meant the code to be:

	For i = Forms.Count -1 To 0 Step -1
    	  Docmd.Close acForm, Forms(i).Name
	Next

Another way is to just remove (close) the first item in the
collection until the collection is empty:

	Do Until Forms.Count = 0
    	  Docmd.Close acForm, Forms(0).Name
	Loop

-- 
Marsh
MVP [MS Access]
0
Marshall
6/4/2007 4:20:39 PM
Hi David:

I was getting ready to rewrite my code to hardwire all my forms in a
select case statement, something along the lines of what Allen and
Arvin suggested, but your ByVal suggestion was less work, so I thought
I'd try it first. Lo and behold ... it worked! I'm delighted,
confused, but delighted.

My boss commented today on what a supportive user community this is. I
agree. Thank you, and thanks to all who came to my aid in a time of
need.

Keith

On Jun 4, 10:13 am, "David W. Fenton" <XXXuse...@dfenton.com.invalid>
wrote:
> Keith <kag...@gmail.com> wrote innews:1180954706.059161.55010@q66g2000hsg.googlegroups.com:
>
> > LoadForm is in the same module as the sub that calls it. What's
> > strange is that if in this sub:
>
> > Private Sub lstBrowse_AfterUpdate()
> >     lstOverviews = Null
> >     lstCreateNew = Null
> >     LoadForm (Forms!frmMenuMain.lstBrowse)           ...
>
> > I replace the LoadForm call with this:
> >     DoCmd.OpenForm "frmBudget", acNormal
>
> > I can exit cleanly from Access, even if the menu form and the
> > budget form are both open.
>
> Is the parameter for LoadForm defined as ByRef (or not declared,
> which is implicitly ByRef)? Try doing it with ByVal, or with:
>
>   LoadForm (Forms!frmMenuMain.lstBrowse.Value)
>
> --
> David W. Fenton                  http://www.dfenton.com/
> usenet at dfenton dot com    http://www.dfenton.com/DFA/


0
Keith
6/4/2007 11:36:21 PM
In news:1180954706.059161.55010@q66g2000hsg.googlegroups.com,
Keith <kagard@gmail.com> wrote:
> Hi Allen:
>
> LoadForm is in the same module as the sub that calls it. What's
> strange is that if in this sub:
>
> Private Sub lstBrowse_AfterUpdate()
>    lstOverviews = Null
>    lstCreateNew = Null
>    LoadForm (Forms!frmMenuMain.lstBrowse)           ...

Just out of curiosity -- and I see that you have resolved the problem 
already -- would the problem go away if you changed this:

>    LoadForm (Forms!frmMenuMain.lstBrowse)

to this:

    LoadForm Forms!frmMenuMain.lstBrowse

?

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


0
Dirk
6/5/2007 4:58:53 AM
Keith <kagard@gmail.com> wrote in
news:1181000181.147011.318760@n4g2000hsb.googlegroups.com: 

> I was getting ready to rewrite my code to hardwire all my forms in
> a select case statement, something along the lines of what Allen
> and Arvin suggested, but your ByVal suggestion was less work, so I
> thought I'd try it first. Lo and behold ... it worked! I'm
> delighted, confused, but delighted.

It works because you're no longer passing a reference to the object,
but the value stored in that object. It's the difference between a
pointer to something else and the string value that the pointer
points to. In your case, the pointer was surviving beyond its
appropriate lifespan, and the solution was to avoid it by passing
the parameter by value instead of by reference. You could have done
the same thing by passing the .Value property of the listbox, but
then it could cause problems if you someday changed your OpenForm
code to assume it was operating on a reference (not likely, I
agree), so it's better to change your OpenForm code to take a value
instead of a reference. 

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
0
David
6/5/2007 6:33:34 PM
Reply:

Similar Artilces:

Clicking one application's buttons from another application
Hello, I'd like to write an application that can click the buttons of another application running on the same machine. All my application knows about the target application is its name, the name of the window containing the buttons, and the name of the buttons. Can someone further my education in this matter in some way. Thanks, Ray Mitchell This is tricky, but possible. I actually do it in a little utility I wrote to move Outlook filters down, since the "Move Down" button doesn't autorepeat and when you have 850 anti-spam filters it becomes a bit unwieldy. What yo...

running another application from my application
Hello, I have an MDI application that on a specific case runs a 3rd party application. I use PeekMessage so my application will be drawn corretly while working on the 3rd party app. I want to prevent the user from doing anything in my application while te 3rd party app is running, until the user closes the 3rd party application. Also I want my application to be shown correctly (handle WM_PAINT, WM_DRAW etc.). Currently my application is displayed very well, but the user may do things in my application while the 3rd party app is running. I use the following code (pseuo): BOOL bRetVal = CreateP...

Application exiting with return Code 3 and ExitInstance not called neither destructors
Hey Friends It seems that i have done something very mysterious as my Application is exiting with return Code 3 and ExitInstance is not not called neither destructors. Plz Help "Vikrant_kpr" <bhatia.manish@netsity.com> wrote in message news:f62362ec.0307170549.7af528cf@posting.google.com... > Hey Friends > It seems that i have done something very mysterious as my Application > is exiting with return Code 3 and ExitInstance is not not called > neither access violation? Dear Antonio Mazzeo I have corrected the problem,it was causing due to Splash Screen Compone...

Cannot assign task operation failed
Outlook 2003 sp1 Exchange 2003 I cannot assign a task to another user, I get: "The Operation Failed. An Object could not be found." The task is in my task list and assigned to the user, however the user never gets the task request.... Help. Thanks, Daniel Erlenbusch derlenbusch@penrad.org ...

Ideas for a Dept Level Application Support
We have an IT group that supports 50 applications and they wish to capture support time by application during course of the year. During the course of a week, any application or combination of applications can have support requests, so it is different week to week and not predictable. Essentially we are looking to park the time with appropriate application after the work is complete. We are using Project Server 2007 and have investigated the following: 1. Created a Annual Support workplan with a task per application in Project Pro with the IT group added as Enterprise resourc...

PDF & Printing not quite right
Hi, On print preview, everything is looking great. When I print, or publish as PDF, some of my boxes are getting a little misplaced. The boxes on the far left line up exactly where I want, but as you go towards the right of the page they are getting moved a little further to the right than I want (and more than what Visio design page as well as print preview are showing). More detail: My background page is a drawing of a circuit board. I'm placing boxes w/ 50% transparency on the main page to highlight some various components on the board. The boxes on the far left of the draw...

Help in creating dialog based application
Hi, I am creating a dialog based application which has a main dialog with 3 buttons. 1. Address Book 2. Student List 3. Course List with which i can go to any one of the screens(which is again the dialog). when i click address book button my main dialog should be hidden/closed and i should open the address book dialog which has again some button to navigate back to main dialog/student list/course list. same kind of functionality for other two dialogs(student/course list). i thought of creating all the 3 dialogs as modeless and main dialog as parent but how i will inform the parent window to ...

DLLs being loaded for all applications
I get the following warning at system startup: "Custom dynamic link libraries are being loaded for every application. The system administrator should review the list of libraries to ensure they are related to trusted applications." How do I review the list of libraries and how do I eliminate any that should be removed? ...

OWA fails after OWA Admin install!!! :(
I installed OWA Admin and OWA failed. I reset the server and IIS does not want to start! I get the following message in IIS when I try to start the default website: "The process cannot access the file because it is being used by another process" I resetted two other times in vain! Any solution? Evan Camilleri I found something: if I change the Default Web Site Properties: SSL from 443 to anything else then it works! Evan Camilleri "Evan Camilleri" <evan@nospam.holistic.com.mt> wrote in message news:eQ8wIcCaEHA.4032@TK2MSFTNGP11.phx.gbl... > I install...

Converting Console Application to win32 application
I have created an MFC console application. When I run it from Windows Explorer it opens a dos box and closes the box when it terminates it logic. Is it possible to convert it so it won't open the dos box - just run without any display? If positive, please help me regarding the steps. Thanks Kalish I am not sure if you can compile MFC with a standard win32 application, but if you can, then you can simply change your main to a WinMain, and you will have the result you want. Create a Win32 Project using the Wizard, and selection Windows Application, to see an example. Remove everthing ...

Failing to find some contacts
I've lost the ability to find a contact when I make a new email. If it is a contact that I've used fairly recently, then it isn't a problem but there are some contacts that I can't send email to. For example, there is an entry in my contacts for Dave Smith but if I put that name into the to box, Outlook will complain that it can't find the contact. When the search box comes up, it says that it can't find any contact at all. One other little data point. A few months back, I had another problem that was 'solved' (and I use the term loosely) by using the Hel...

MSMQ ... authenticating application
A number of application stores messages in MSMQ. One of the server application needs to read messages that was created/stored by specific applications not to read all the messages in MSMQ. Is there any workarounds? Thank you Regards Raj "Raj" <Raj@discussions.microsoft.com> wrote in message news:6917708E-88B1-497B-A888-5038ACEA17CE@microsoft.com... >A number of application stores messages in MSMQ. One of the server > application needs to read messages that was created/stored by specific > applications not to read all the messages in MSMQ. > ...

is there a hotel management excel application?
The subject says is all... TIA Martyn Hi Martyn, See response to your thread in Programming. --- Regards, Norman "Cheker" <zoomer@gmail.com> wrote in message news:eNJLsRRqEHA.348@TK2MSFTNGP15.phx.gbl... > The subject says is all... > TIA > Martyn > > > ...

DLL
Is there any way to detect when an application that is calling my dll is about to be destroyed? I need to close several files if the calling application has not done so, therefore I need to detect when the calling application is about to be destroyed and clean up the files and variables I have used in the dll. You need to implement DllMain, the handle your cleanup tasks when you receive a PROCESS_DETACH notification. Check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_initialize_non.2d.mfc_dlls.asp "Joe Estock" <jestock@NOSPAMnutexto...

MFC applications and Visual C++'s newer editions
Hello. When it comes to Win32, Visual Studio .NET 2005 Express Edition Beta 2 only allows the creation of console-based applications. What if one wanted to create MFC-based applications and, at the same time, be able to take advantage of the powerful and conforming C++ compiler that comes with the package? I hope that resorting to Visual C++ 6.0 is not the only option. Thank you, -- Ney Andr� de Mello Zunino "Ney Andr� de Mello Zunino" <zunino@inf.ufsc.br> wrote in message news:%23FuRyAcXFHA.584@TK2MSFTNGP15.phx.gbl... > Hello. > > When it comes to Win32, Vi...

The rules that failed to upload have been deactivated
Windows 2000, Outlook 2000, Windows Server 2000, Exchange 2000. We have moved our email from an old to a new server. Now, when an email comes in that should be taken care of by a rule, I get a message about Rules in Error, and it lists the rule the message applies to and says the folder to move/copy to doesn't exist. It does. If I try to open the Rules with the Rules Wizard, I get a message: The Rules on this Machine Do Not Match the Rules on Your Exchange Server. Only one set of rules can be kept. You will usually want to keep the rules on the server. Which rules do you want t...

Telnet application
Greets, Quick question.... If I was to write a VB6 app for configuring an IP device using Telnet, would it be more advantageous to use the Winsock control, or the INet control for the telnet session ? The device has the telnet server, I just need to write a GUI that uses telnet as a client to communicate with the device, and then present the configuration info in a typical GUI way. TIA, DanS "DanS" <t.h.i.s.n.t.h.a.t@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message news:Xns9CEA5E17494CEthisnthatroadrunnern@216.196.97.131... > Greets, > > Quick...

Windows XP logon fails
I have just done a clean install of a plagued Widows XP laptop at a remote location. After creating VPN connection and confirming logon I set the pc to domain instead of workgroup. Now it won't let me login to domain while I am remote saying there is no connection. Obviously I can't start VPN till I get to desktop. What am I missing here? I had this working before I wiped the system and reinstalled XP. Thanks for any help. NT-based versions of windows from 2000 on, including XP, will cache credentials by default once you've logged on successfully once. You can log...

Hiding application
Hello, How can I hide my application from the user? I don't want him to see it in Task Manager, Task Bar, etc. Regards, Vladimir. "Vladimir" <genisoft@ufacom.ru> wrote in message news:ueUr72idDHA.736@TK2MSFTNGP09.phx.gbl... > Hello, > > How can I hide my application from the user? I don't want him to see it > in > Task Manager, Task Bar, etc. Make it a service. -- -GJC -Software Consultant (Embedded systems and Real Time Controls) -gchanson@mvps.org -Abolish public schools It'll be still visibled, and killable by administrator - li...

Using MABLE logic engine with existing .NET applications.
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web services. � MABLE utilizes SOAP 1.2 protocol. � MABLE uses AXIS 1.4 as a web service transport. � MABLE support state-full conversations by implementing a conversation session. In this small article we will create a client application that use the MABLE 'Store' application MABLE Web Service client has to maintain a state-full conversation with the MABLE engine. The best way to handle this is...

Change 1 dialog application to 2 dialogs applications?
Hi, I have made a mfc dialog based application. Now I want to change it to 2 dialogs, one wizzard and one classic, and i want the 2 dialog can call each other. So I change the codes in App::InitInstance() { ..... while (CGlobal::Get()->m_eView!=CGlobal::Quit) { WizzardDlg dlg0; CClassicDialog dlg1; CDialog *pdlg=0; if (CGlobal::Get()->m_eView==CGlobal::Wizzard) { pdlg = &dlg0; } else if (CGlobal::Get()->m_eView==CGlobal::Classic) { pdlg = &dlg1; } m_pMainWnd = pdlg; int nResponse = pdlg->DoModal(); } I found DoModal() only launch the dialog s...

Application crashes at start-up
Hi A new framework 3.5 Winform db app that works fine on two pcs, crashes on one particular pc at start-up. The app has application framework enabled and I have assigned a splash form and a main form. The splash form appears for around 20 second but then app crashes with message "<app name> has encountered a problem and need top close..." and wants to send a report to MS. I have trapped the MyApplication_UnhandledException but it does not get triggered as far as I can tell. Older framework 1.1/vs2003 apps work fine on this pc. The only obvious difference I can see...

KB983583; KB982524 fail to install
Little activity in eternal september's microsoft.public.windowsupdate so posted here too. Appols for any confusion. S Security Update for .NET Framework 2.0 SP2 and 3.5 SP1 on Windows Server 2003 and Windows XP x86 (KB983583) Microsoft .NET Framework 3.5 SP1 and .NET Framework 2.0 SP2 Update for Windows Server 2003 and Windows XP x86 (KB982524) A while since I went back on the pc and some of it's updates don't seem to have been going through. It's XPPro SP3 with 2gig ram and Avast AV and Spybot's Teatimer (the latter turned off during the install attem...

Cannot start SBS Web Applications
2008 SBS Server Migrated from 2003 SBS Server SBS Web Applications will not start, "This website cannot be started. Another web site may be using the same port" Goal: get OWA working without needed to trick IIS This problem has been ongoing since the install of 2008 SBS server. Currently IIS will not automatically start SBS Web Applications due to the Default Web Site and SBS Web Applications using the same HTTPS bindings. The only way I have managed to get them to work is change the bindings to 444, start it, then change it back to 443. This only works until IIS is re...

Spontaneous application exit
We have an MFC dialog based application that has up to 100 threads reading data from different sources over TCP/IP and then storing the data into an oracle database. Database updates are realtively infrequent (maybe once or twice a scond overall). We are having problems with the application just exiting. Sometimes it will run for days, sometimes for just a few hours. The user is definitely not exiting the application. We have try/catch sections around most code and around each thread which isn't getting triggered and we detect memory allocation failures (which aren't happenin...