Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9082437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:33:28+00:00 2026-06-16T20:33:28+00:00

I have a quirk with my Access app that I cannot debug. I have

  • 0

I have a quirk with my Access app that I cannot debug.
I have a form that essentially makes an insertion into a ‘completed’ table and a deletion from a ‘pending’ table. Design preferences aside, this is how I’m doing it rather than having some sort of ‘Status’ column.

I’ll summarize my code with the relevent lines.

First it makes the insertion into the completed table, then the simple deletion:

    qr = "DELETE * FROM tblPendingClasses WHERE ((tblPendingClasses.ID = " & curr         & "));" 'build the query
    Debug.Print qr
    MsgBox (qr)
    dbMine.Execute qr, dbFailOnExecute

     Form.Refresh 'refresh,requery
     Form.Requery
     MsgBox ("Class review complete.")
     docmd.close

The query is built fine, from the debug statement and msgbox, but it just doesn’t do anything. I look at the table for pending classes, and the class with the ID I’m trying to delete is just sitting there. No meaningful errors, nothing. This used to work, and works sometimes, but is not working at the moment.

Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:33:29+00:00Added an answer on June 16, 2026 at 8:33 pm

    If your module includes Option Explicit, you should get a compile error, “Variable not defined” on this line:

    dbMine.Execute qr, dbFailOnExecute
    

    Probably you intended dbFailOnError instead of dbFailOnExecute as the option for the .Execute method. Add Option Explicit to the Declarations section of your code module so the VBA compiler will alert you when you attempt to use the name of a constant which doesn’t exist (dbFailOnExecute). Then compile and fix any other issues the compiler complains about.

    The Database.Execute Method help topic recommends:
    “… always use the dbFailOnError option when using the Execute method to run an update or delete query. This option generates a run-time error and rolls back all successful changes if any of the records affected are locked and can’t be updated or deleted.“

    So dbFailOnExecute will give you the run-time error message which explains why the expected deletions didn’t happen.

    After making those changes, if you still don’t get any rows deleted and no error message, make sure you don’t have SetWarnings switched off.

    DoCmd.SetWarnings True
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an app where I have a flash app that access
I have some (small amount) of data that I'll need quick access to on
Just need some quick clarification I have 2 Queries in my Access Database that
I have a weird quirk with cookies in IE. When a user logs into
I'm currently writing a Rails app, and hit a somewhat strange quirk. I have
I have a .NET (3.5 w/ Dev Studio 2008) app that hosts a visual
I have read-only access to a database that was set up for a third-party,
I am writing my first little Access 2003 application. I have two queries that
I am developing an app that needs to send text messages, so I have
I have around 3000 jpegs that I'm using in my app. The image names

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.