I have fields that autopopulate so that the user wont have to type in the same info over and over. The only problem with this is that the user can keep hitting new record because this info is automatically being stored and causes a bunch of (basically) blank records in the table. I built a delete query that will delete any records that arent completely filled in. I want it to run when the user is done filling in their form (OnUnload), but i dont want them to be prompted that this query is running (so they dont think they're deleting something important). Is it possible to have a delete query run without the prompts?
Thanks!
11 13027 Rabbit 12,516
Recognized Expert Moderator MVP
In VBA there's a DoCmd.SetWarnin gs True/False.
Surround your query with that. -
DoCmd.SetWarnings False
-
DoCmd.RunSQL "DELETE ..."
-
DoCmd.SetWarnings True
-
I have fields that autopopulate so that the user wont have to type in the same info over and over. The only problem with this is that the user can keep hitting new record because this info is automatically being stored and causes a bunch of (basically) blank records in the table. I built a delete query that will delete any records that arent completely filled in. I want it to run when the user is done filling in their form (OnUnload), but i dont want them to be prompted that this query is running (so they dont think they're deleting something important). Is it possible to have a delete query run without the prompts?
Thanks!
Have you tried? -
DoCmd.Setwarnings = False
-
'Run your delete query here
-
DoCmd.Setwarnings = True
Regards,
Scott
Rabbit, you beat me to it! Must have been posting at the same time again :-(
Regards,
Scott
Rabbit 12,516
Recognized Expert Moderator MVP
Rabbit, you beat me to it! Must have been posting at the same time again :-(
Regards,
Scott
I'm quick like a fox.
you guys are the best!
Thanks!
Rabbit 12,516
Recognized Expert Moderator MVP
Not a problem, good luck.
Fox? Rabbit? They were all VWs, weren't they?
Rabbit 12,516
Recognized Expert Moderator MVP
Fox? Rabbit? They were all VWs, weren't they?
I know the Rabbit is one. I don't know about the Fox.
I know the Rabbit is one. I don't know about the Fox.
So why did the Rabbit look so much like a turtle??
Oh, right, that was the Beetle ;-) LOL
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Joe Del Medico |
last post by:
I have two tables A & B and I want to delete all the records in A that
are not in B. Can I do this in the query builder? It seems like a
simple problem.
I can easily find the records in A that aren't in B by using the query
wizard to come up with a query "A without matching B".
I added table A to the query builder and Query "A without matching B"
joined them with the index field (Loan Number) made the query a delete
query and
|
by: lis0122 |
last post by:
I'm a database marketing manager for a small non-profit. I created a
query that prompts you for a company name and then pulls a list of all
of our contacts in the database in that company. Our sales folks are
always asking for company contact lists and I just plug it in to this
query and send them the list in excel.
I want to give them the capability of using this query themselves
without going through me. But I want them to do this...
|
by: sparks |
last post by:
I was running an update query and a make table query from a form to
modify some data in a table.
DoCmd.OpenQuery "qryrename"
DoCmd.OpenQuery "qrymaketest"
but this prompts you for everything.
can these be run without prompts or maybe even cutting the sql code
from the queries and running them in place of the commands.
|
by: tom |
last post by:
Is it possible to have a report with prompts/parameters, but without an
underlying query? I've seen varying posts related to this, but I'm not
seeing a concete answer. As I understand it, to make a report with
prompts, the parameters (e.g., start and end dates) must be first
defined in the report's underlying query. Thus, I am concluding:
A) The Table-Report construct (without an explicit underlying query) is
for basic...
|
by: forbes |
last post by:
Hi,
I have a user that used the Query Wizard to create a query in Access.
Now she claims that her master table is missing all the data that was
excluded from the query. Can you create anything other than a select
query using the Wizard? What do you think happened to her data?
I am working remotely until Friday, so I can't get down to her office
and check out what she did.
| |
by: (PeteCresswell) |
last post by:
I've got apps where you *really* wouldn't want to delete certain items by
accident, but the users just have to have a "Delete" button.
My current strategies:
Plan A:
------------------------------------------------------------------------
1) Make the cmd button black and do not give it an accelerator key.
2) Issue two levels of confirmation (Do you want to delete... Do you REALLY want
|
by: Kevin M |
last post by:
I have one table and have created a form from that table. Also, I have
created a delete query. I want to but a button on the form which will delete
all records from the table; however, I cannot get anything to work. I know
this is probably simple for more experienced Access users. Any help would be
greatly appreciated.
Thanks
Kevin
|
by: Bob Bridges |
last post by:
Start with two tables, parent records in one and child records in the other,
a one-to-many relationship. Create a select statement joining the two.
Display the query in datasheet mode. When I delete a row, only the child
record is deleted from the source tables; the parent record is still
there...which is what I wanted.
Now display fields from that query in a continuous form. When I delete a
record from that form, one of the child...
|
by: Presto |
last post by:
I have form with a Close button. When the button is closed, I want it to
first delete all records in tblCustomerID then close the form.
I would like the delete query to just run and not prompt me over and over
and over to confirm because I WANT to DELETE them.
If it's better to run it as SQL code and not a separate query, that's cool,
but I have no idea how to do this.
Heres the code behind the OnClick event:
Private Sub...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |