Solved

Warning msg: "You are about to delete 0 row(s) from the specified table" -- ZERO!?!? HELLO!?!?

Posted on 2007-03-28
9
364 Views
Last Modified: 2011-09-20
I developed an Access database and it is now in the testing/debugging phase with one user playing with the databsae.  The user said that each time she exits the database, she gets a message that pops up saying "You are about to delete 0 row(s) from the specified table."   I am perplexed because I have not seen this message and when I open the same file that the user is working on, it doesnt give me the message on my computer.  Its only on her computer, what's the deal?

The only thing I could think of was my Appointments table.  I have a form that you can use to add appointments/meetings in the Outlook calendar.  So I set up a query to delete all rows in the appointments table when the user exits.  I added the SetWarning messages in my code and the user is STILL getting the same message when she exits the database.

Private Sub Form_Close()
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * from tblAppointments;"
DoCmd.SetWarnings True
ChangeResolution800x600
Application.Quit
End Sub


This was the only thing I could think of because the user wasn't doing any data entry or trying to delete anything or even trying to add an appointment and it's weird to get a message saying, "You are about to delete ZERO rows".....ZERO!?!??! Why is this happening?!?!?  Please help!!!  This is a difficult challenge for me because I can't test this when I'm not even getting the error message.
0
Comment
Question by:llputney
  • 5
  • 3
9 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 18809074
>DoCmd.RunSQL "DELETE * from tblAppointments;"

Try this instead:
CurrentDB.Execute "DELETE * from tblAppointments;", dbFailOnError
0
 

Author Comment

by:llputney
ID: 18809178
:(  Didn't work.

Another thing that's weird is that both the user and I are on a shared network drive and we both have access to the same file.  Now, when I tell her to open her database to check something, I don't see her opening it.  I mean, I almost never see the .ldb file and I only see that when I have the database open on my computer.  
0
 
LVL 75
ID: 18809293
What is:

ChangeResolution800x600

?

mx
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 250 total points
ID: 18809306
Possibly some odd ball timing issues ... code executing during the OnClose followed by Quit.  Can you experiment by moving the code elsewhere ... as a test, if you see what I mean?

mx
0
 

Author Comment

by:llputney
ID: 18809358
Unfortunely, the user uses an 800 x 600 screen resolution and I found out AFTER the fact that I designed it on a 1024 x 768 screen setting.  So, I devised a temporary solution to change the user's screen resolution to 1024 x 768 when the open the db and change it back to 800 x 600 when they exit.  I ordered the ShrinkerStretcher software and I'm still waiting for it.  Once I get it, I will be able to remove the screen resolution problem.  Do you think that's what it is?

Which part of the coding should I move?
0
 

Author Comment

by:llputney
ID: 18809750
I'm SOOOOOO embarrassed...sigh.

I was making changes in the wrong file....no wonder why I couldn't see the user opening/closing the file on our shared network drive.  I feel so so so foolish!!!

My FIRST solution actually worked which was to set up the SETWarning codes:

Private Sub Form_Close()
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * from tblAppointments;"
DoCmd.SetWarnings True
ChangeResolution800x600
Application.Quit
End Sub


So, how should I handle this request?  Shoudl I reward points for your efforts or should I get them refunded?

So Sorry to waste anytime's time, including MINE!!!
0
 
LVL 75
ID: 18809793
Split the points between me and mbiz ... for 'effort'.

btw ... The PetersSoftware SS is VERY cool.  I bought it  and it works VERY well ... covers almost all cases of forms, subforms, tabs .... etc.  It's one cool piece of software.

mx
0
 

Author Comment

by:llputney
ID: 18810593
I canNOT wait to get PetersSoftware, thanks for the review!!!
0
 

Author Comment

by:llputney
ID: 18810609
Uh oh! I couldn't figure out how to split points since EE has had a new makeover.  I clicked "Accept Mulitple Solutions" and ended up only selecting one solution.  Sorry mbizup!  Appreciate the effort anyway!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now