I have created an append query that I would like to run when the DB is opened.
However I do not want the end user to receive the "yes" "no" confirmation box when the query is being run.
Can anyone help me remove this confirmation box?
6 6538
I have created an append query that I would like to run when the DB is opened.
However I do not want the end user to receive the "yes" "no" confirmation box when the query is being run.
Can anyone help me remove this confirmation box?
Before the line in the VBA that runs the query add "DoCmd.SetWarni ngs = false"
Afterwards add "DoCmd.SetWarni ngs = true"
I think that's right, but I'm newish.
Before the line in the VBA that runs the query add "DoCmd.SetWarni ngs = false"
Afterwards add "DoCmd.SetWarni ngs = true"
I think that's right, but I'm newish.
The DoCmd.SetWarnin gs = False and True is correct. As an added option, that I now prefer, you can use the more specific: - Application.SetOption "Confirm Action Queries", False
Do not forget to change it back to True after running your code.
Regards,
Scott
I did figure out one way to do this. Access 07 - Select Office Button, Access Options, Advanced, then uncheck "Action Queries". However this does not remove confirmation box for users other than yourself on your local machine.
When using VB Script all that I see is code for Form. Nothing appears for tables or queries.
I did figure out one way to do this. Access 07 - Select Office Button, Access Options, Advanced, then uncheck "Action Queries". However this does not remove confirmation box for users other than yourself on your local machine.
When using VB Script all that I see is code for Form. Nothing appears for tables or queries.
Where is your query running from? I assumed that since you said it was to run on opening of the application, it would be run from the Form_Load() event of your default form like so: - Private Sub Form_Load()
-
-
DoCmd.SetWarnings = false
-
DoCmd.OpenQuery "YourQuery"
-
DoCmd.SetWarnings = true
-
-
End Sub
Or is that not how you're doing it?
This took care of it: -
Private Sub Form_Open(Cancel As Integer)
-
' Minimize the database window and initialize the form.
-
-
On Error GoTo Form_Open_Err
-
-
' Minimize the database window.
-
DoCmd.SelectObject acForm, "Switchboard", True
-
DoCmd.Minimize
-
-
' Move to the switchboard page that is marked as the default.
-
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
-
Me.FilterOn = True
-
-
Form_Open_Exit:
-
Exit Sub
-
-
Form_Open_Err:
-
MsgBox Err.Description
-
Resume Form_Open_Exit
-
-
End Sub
-
-
Private Sub Form_Current()
-
' Update the caption and fill in the list of options.
-
-
Me.Caption = Nz(Me![ItemText], "")
-
FillOptions
-
-
End Sub
-
Thanks for the help folks.
I commend you on an innovative solution!
I do wonder, however, if this would work equally well without the step you mentioned in post #4? Those Yes/No popup boxes are usually modal, which means that they must be satisfied before moving on with the program.
I don't see anything in your code which changes this default modal behavior, so you must be changing that somewhere else.
Thanks for posting back with your solution.
Regards,
Scott
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: TonyJeffs |
last post by:
<SCRIPT language="JavaScript">
function anna18(){ window.open
("Slideshow/anna18.htm","","scrollbars=no,fullscreen=yes") }
</SCRIPT>
Why does the above still have a scrollbar?
The actual web site (poor photos of 18th birthday party!) is at:
http://www.tonyjeffs.com/Anna18th
|
by: deko |
last post by:
I'm getting intermittent "Object Invalid or No Longer Set" errors in my
Access 2002 mdb.
What causes these errors?
Has anyone dealt with this before?
I can't trace it because it's not easy to duplicate -- it just show up...
I've heard that spurious queries that use Now() or Date() or some other date
|
by: Grey |
last post by:
i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different action for these two choices.
Million Thanks..
|
by: Stan |
last post by:
When I create a Web project and then try to add the files to it (Add
Existing Item), I get
this error message
"The folder http://localhost/FinWeb is no longer availabe"
In fact the folder and the virtual directory FinWeb both exist and project
compiles just fine, but I cannot add the existing files to it.
If I create a project with a different name (FinWeb2) it works fine.
|
by: Tristán White |
last post by:
Hi
I am very new to PHP - actually, this is my second day at it, as I've only
recently started a new job last week. We're a charity.
I have a "No input file selected" problem. A Google search has shown me that
this is a common problem, but I have tried to follow all the various
instructions but none of them make any difference.
First of all... Some background on the page it links from.....
| |
by: balakrishnan.dinesh |
last post by:
hi Frnds,
I need Confirm box with "yes" or "no" buttons, Is that
possible in JAVASCRIPT ,
Can anyone tell me the solution for this or anyother way to create
confirm box with "yes" or "no" button?
Thanks & Rgrds
Dinesh...
|
by: JHNielson |
last post by:
I have a simple question, but I can't seem to find the answer.
I have this code to count the number of records that pass through a set of processes:
It counts how many records go through INPUT, VALIDATED, ERRORS
This is the code to get the numbers:
Function Val_Message()
|
by: EManning |
last post by:
Using A2003. I'm receiving this error when returning from a
"DoCmd.OpenReport..." statement. I have a tab control with a subform
on every tab. The user selects an item from a combobox at the top of
the main form which refreshes all the subforms. If this DoCmd
statement is not executed, then I don't receive the error. I tried a
"DoCmd.OpenQuery..." instead of a report but get the same error.
I want the user to be able to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |