Just noticed something interesting in the above. If you have your program
file set to "Compact on Close" in access 2007 (which is desirable when you
have a larger program that frequently needs compacting), if you use the
following code on an "Exit Application" type button, the compacting on close
won't fire:
Application.Qui t acQuitSaveNone
however, if you use:
Docmd.Quit
Then the compacting on close does fire.
Has anyone else seen this? Any dangers with docmd.quit, or is
application.qui t just a preferred method?
Many Thanks, 9 21394
"Andy" <PC*****@PCESof t.invalidwrote in message
news:Ma******** *********@nlpi0 65.nbdc.sbc.com ...
Just noticed something interesting in the above. If you have your program
file set to "Compact on Close" in access 2007 (which is desirable when you
have a larger program that frequently needs compacting), if you use the
following code on an "Exit Application" type button, the compacting on
close won't fire:
Application.Qui t acQuitSaveNone
however, if you use:
Docmd.Quit
Then the compacting on close does fire.
Has anyone else seen this? Any dangers with docmd.quit, or is
application.qui t just a preferred method?
For me, compact on close is not a required option because I have my apps set
up such that a new, pristine front end file is delivered to the user's PC
with every new session. As far as I can tell, compact on close is only ever
any use when you have a single file single user application. There are
issues with the DoCmd.Quit method although, off the top of my head I can't
remember what they are. What I do remember is recently going through all of
my apps and replacing every instance with Application.Qui t. But if your app
is of the single file single user nature (ie only you use it) then I
wouldn't lose too much sleep about using DoCmd.Quit.
Keith. www.keithwilby.co.uk
Thanks for the reply, Keith.
It's a front end / back end runtime app. People have posted before against
using the compact on close, but in my testing, you're really talking about
only compacting the front end on close, it won't do anything to the back
end, so I'm leaning towards 'compacting on close' being a great thing (see
my new post from a few minutes ago)...
Take care,
"Keith Wilby" <he**@there.com wrote in message
news:49******** @glkas0286.gree nlnk.net...
"Andy" <PC*****@PCESof t.invalidwrote in message
news:Ma******** *********@nlpi0 65.nbdc.sbc.com ...
>Just noticed something interesting in the above. If you have your program file set to "Compact on Close" in access 2007 (which is desirable when you have a larger program that frequently needs compacting), if you use the following code on an "Exit Application" type button, the compacting on close won't fire:
Application.Qu it acQuitSaveNone
however, if you use:
Docmd.Quit
Then the compacting on close does fire.
Has anyone else seen this? Any dangers with docmd.quit, or is application.qu it just a preferred method?
For me, compact on close is not a required option because I have my apps
set up such that a new, pristine front end file is delivered to the user's
PC with every new session. As far as I can tell, compact on close is only
ever any use when you have a single file single user application. There
are issues with the DoCmd.Quit method although, off the top of my head I
can't remember what they are. What I do remember is recently going
through all of my apps and replacing every instance with Application.Qui t.
But if your app is of the single file single user nature (ie only you use
it) then I wouldn't lose too much sleep about using DoCmd.Quit.
Keith. www.keithwilby.co.uk
Keith Wilby wrote:
"Andy" <PC*****@PCESof t.invalidwrote in message
news:Ma******** *********@nlpi0 65.nbdc.sbc.com ...
>Just noticed something interesting in the above. If you have your program file set to "Compact on Close" in access 2007 (which is desirable when you have a larger program that frequently needs compacting), if you use the following code on an "Exit Application" type button, the compacting on close won't fire:
Application.Qu it acQuitSaveNone
however, if you use:
Docmd.Quit
Then the compacting on close does fire.
Has anyone else seen this? Any dangers with docmd.quit, or is application.qu it just a preferred method?
For me, compact on close is not a required option because I have my apps
set up such that a new, pristine front end file is delivered to the
user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application?
As far as I can tell, compact on
close is only ever any use when you have a single file single user
application. There are issues with the DoCmd.Quit method although, off
the top of my head I can't remember what they are. What I do remember
is recently going through all of my apps and replacing every instance
with Application.Qui t. But if your app is of the single file single
user nature (ie only you use it) then I wouldn't lose too much sleep
about using DoCmd.Quit.
If one compacts on close, isn't the compact on the FE? Again, I'd think
this could be a problem if you had 2 or more sessions open.
>
Keith. www.keithwilby.co.uk
"Salad" <oi*@vinegar.co mwrote in message
news:YM******** *************** *******@earthli nk.com...
Keith Wilby wrote:
>> For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application?
A good question but it's a scenario I've never encountered. I suspect that
it will be the same as 2 users sharing a FE file on a server. In the 10 or
so years I've been using that setup I've never had any problems with it.
Would you recommend a different approach or even having code to mitigate for
that possibility?
Keith.
Using full access, you can open 2 instances of the same program (which I've
done by mistake many times). But using the runtime, you can't open a second
instance of the same mde/accde file.
"Keith Wilby" <he**@there.com wrote in message
news:49******** **@glkas0286.gr eenlnk.net...
"Salad" <oi*@vinegar.co mwrote in message
news:YM******** *************** *******@earthli nk.com...
>Keith Wilby wrote:
>>> For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application?
A good question but it's a scenario I've never encountered. I suspect
that it will be the same as 2 users sharing a FE file on a server. In the
10 or so years I've been using that setup I've never had any problems with
it. Would you recommend a different approach or even having code to
mitigate for that possibility?
Keith.
Keith Wilby wrote:
"Salad" <oi*@vinegar.co mwrote in message
news:YM******** *************** *******@earthli nk.com...
>Keith Wilby wrote:
>>> For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application?
A good question but it's a scenario I've never encountered. I suspect
that it will be the same as 2 users sharing a FE file on a server. In
the 10 or so years I've been using that setup I've never had any
problems with it. Would you recommend a different approach or even
having code to mitigate for that possibility?
I probably would use some code to enumerate the class/caption of open
windows http://www.mvps.org/access/api/api0013.htm. If one exists I
know a session of the app is open and would not copy over another copy
of the app.
Keith.
Andy wrote:
Using full access, you can open 2 instances of the same program (which
I've done by mistake many times). But using the runtime, you can't open
a second instance of the same mde/accde file.
My users of A2003 don't have that problem. They can open up multiple
instances of the app with an MDE using the runtime. Maybe it's a 2007
thing.
>
"Keith Wilby" <he**@there.com wrote in message
news:49******** **@glkas0286.gr eenlnk.net...
>"Salad" <oi*@vinegar.co mwrote in message news:YM******* *************** ********@earthl ink.com...
>>Keith Wilby wrote:
For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application? A good question but it's a scenario I've never encountered. I suspect that it will be the same as 2 users sharing a FE file on a server. In the 10 or so years I've been using that setup I've never had any problems with it. Would you recommend a different approach or even having code to mitigate for that possibility?
Keith.
I use the sagekey script, so maybe it's opening as exclusive using their
shortcuts, etc.
"Salad" <oi*@vinegar.co mwrote in message
news:WL******** *************** *******@earthli nk.com...
Andy wrote:
>Using full access, you can open 2 instances of the same program (which I've done by mistake many times). But using the runtime, you can't open a second instance of the same mde/accde file.
My users of A2003 don't have that problem. They can open up multiple
instances of the app with an MDE using the runtime. Maybe it's a 2007
thing.
>>
"Keith Wilby" <he**@there.com wrote in message news:49******* ***@glkas0286.g reenlnk.net...
>>"Salad" <oi*@vinegar.co mwrote in message news:YM****** *************** *********@earth link.com...
Keith Wilby wrote:
> For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the applicatio n?
A good question but it's a scenario I've never encountered. I suspect that it will be the same as 2 users sharing a FE file on a server. In the 10 or so years I've been using that setup I've never had any problems with it. Would you recommend a different approach or even having code to mitigate for that possibility?
Keith.
"Salad" <oi*@vinegar.co mwrote in message
news:p8******** *************** *******@earthli nk.com...
Keith Wilby wrote:
>"Salad" <oi*@vinegar.co mwrote in message news:YM******* *************** ********@earthl ink.com...
>>Keith Wilby wrote:
For me, compact on close is not a required option because I have my apps set up such that a new, pristine front end file is delivered to the user's PC with every new session.
What happens when a user attempts to open 2 sessions of the application? A good question but it's a scenario I've never encountered. I suspect that it will be the same as 2 users sharing a FE file on a server. In the 10 or so years I've been using that setup I've never had any problems with it. Would you recommend a different approach or even having code to mitigate for that possibility?
I probably would use some code to enumerate the class/caption of open
windows http://www.mvps.org/access/api/api0013.htm. If one exists I know
a session of the app is open and would not copy over another copy of the
app.
Thanks Salad. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Conorozzo |
last post by:
I create a new Access.Application instance. As soon as I refernce the property "References", I am unable to issue a truly successful quit on that instance. By that I mean the call to quit is fine but if you look in task manager, the instance is still running. Furthermore, if you opened a database using that instance, you will not be able to open it until you quit the entire application or until you kill that process. BTW, the process is...
|
by: jj |
last post by:
I've got a form button that fires off 3 queries but if the first query
returns an error, I don't want the other two queries to happen.
Example: first query runs an insert from a linked table but if for some
reason a field is missing a value that's required, Access throws up an
error. At that point I just want to end the process and notify them of the
error so they can correct the data and try the process again.
Here's my code:
|
by: Lauren Quantrell |
last post by:
If an Access2K ade is running, say it's named app1.ade, and I open
app2.ade, I want app2.ade to determine if app1.ade is running, and if
it is, I want app2.ade to close app1.ade.
Is this easy?
lq
|
by: Robert Langen |
last post by:
I'm calling an Access XP application from an Outlook XP appointment form.
Everything works, but the lines
DoCmd.OutputTo acOutputReport, "testreport", acFormatRTF, "c:\test.rtf",
False
Docmd.Quit
produce Access hangs. That means, the file testreport.rtf is correctly
created, but Access doesn´t quit. The process msaccess.exe stays and
consumes 98% processor time. If I remove the OutputTo line, Access quits
perfectly.
|
by: beowulfs |
last post by:
Here's what I've got:
I've got a form with combo boxes. you can select already existing
company names or type in new ones. if you type in a new one, it
prompts you to double click the combo box if you want to add a new
company. when you double click it brings up the new company form so
you can enter the rest of the information besides just the name there.
This all works.
Here's what I want:
| |
by: Max |
last post by:
I have the following code on a form that launches Microsoft Outlook and creates a new email message for the user:
Outlook.Application oApp = new Outlook.Application();
Outlook.MailItem oMail = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
oMail.HTMLBody = "SOME HTML TEXT HERE";
oMail.Display(oApp);
oMail.Close(Outlook.OlInspectorClose.olDiscard);
|
by: Alan T |
last post by:
I tried to close the word document object and word application:
private Interop.Word.Application WordApp;
private Interop.Word.Document WordDoc;
// close word and quit word application
WordDoc.Close(ref _newMissing, ref _newMissing, ref _newMissing);
WordApp.Application.Quit(ref _notTrue,
ref _newMissing,
ref _newMissing);
|
by: Alan T |
last post by:
private Interop.Word.Application _mergeWordApp;
I tried to quit the Word application:
_mergeWordApp.Application.Quit(ref _notTrue, ref _newMissing, ref
_newMissing);
However, I got compilation warning -
|
by: Alan T |
last post by:
private Interop.Word.Application _wordApp;
What is the differences betwenn
_wordApp.Quit(...)
and _wordApp.Application.Quit(...) ?
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |