473,383 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Run a delete query without prompts?

111 100+
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!
Aug 13 '07 #1
11 12944
Rabbit
12,516 Expert Mod 8TB
In VBA there's a DoCmd.SetWarnings True/False.
Surround your query with that.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.SetWarnings False
  2. DoCmd.RunSQL "DELETE ..."
  3. DoCmd.SetWarnings True
  4.  
Aug 13 '07 #2
Scott Price
1,384 Expert 1GB
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?
Expand|Select|Wrap|Line Numbers
  1. DoCmd.Setwarnings = False
  2. 'Run your delete query here
  3. DoCmd.Setwarnings = True
Regards,
Scott
Aug 13 '07 #3
Scott Price
1,384 Expert 1GB
Rabbit, you beat me to it! Must have been posting at the same time again :-(

Regards,
Scott
Aug 13 '07 #4
Rabbit
12,516 Expert Mod 8TB
Rabbit, you beat me to it! Must have been posting at the same time again :-(

Regards,
Scott
I'm quick like a fox.
Aug 13 '07 #5
Neekos
111 100+
you guys are the best!

Thanks!
Aug 13 '07 #6
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Aug 13 '07 #7
missinglinq
3,532 Expert 2GB
Fox? Rabbit? They were all VWs, weren't they?
Aug 13 '07 #8
Rabbit
12,516 Expert Mod 8TB
Fox? Rabbit? They were all VWs, weren't they?
I know the Rabbit is one. I don't know about the Fox.
Aug 13 '07 #9
Scott Price
1,384 Expert 1GB
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
Aug 13 '07 #10
missinglinq
3,532 Expert 2GB
Actually the Fox looked kind of like the Rabbit. It was made in South America, Brazil I think and imported here in the late 8os to early9os.
Aug 13 '07 #11
Scott Price
1,384 Expert 1GB
Actually the Fox looked kind of like the Rabbit. It was made in South America, Brazil I think and imported here in the late 8os to early9os.
And then after the Rabbit came the Golf! I remember now...

Actually didn't the Fox become the Scirroco, or something like that?

(Don't get any ideas about your second career, Rabbit... I think Tiger's got that field all sewed up :-) LOL
Aug 13 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
5
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...
2
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....
1
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...
13
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...
17
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:...
3
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...
5
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...
2
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.