Results 1 to 10 of 10
  1. #1
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80

    confirm before running queries

    basically, on clicking a button, i want a series of append and delete queries to happen to move some information around in the tables. but first, i open a confirmation window.



    it opens modal, and pop up, with a yes and no button. on click no is "close window" (the confirmation window). and i've tried both "stop all macros" and "cancel event" and neither have worked. any thoughts? please keep these in macro builder context for me. i'm not too versed in code. thanks.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    It sounds like it is time for you to try some VBA. Avoiding VBA when using Access is like trying to avoid sand at the beach!

    Here is a basic code snippet that you can practice with. Simply build a blank DB and create a form to start. Post # 2
    https://www.accessforums.net/access/...ple-38149.html



    Post 2 and 4 here have some more (similar) MsgBox examples. This relates to your query question....
    https://www.accessforums.net/program...put-38533.html

  3. #3
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    i know i do... the irony here is i don't go to the beach because i hate sand...

    basically the sooner i get this database done the better. it's not the appropriate time to learn VBA, as much as I want to. And I do. I own my geekiness, and i actually enjoy db admin work.

    so when i get this thing running, how would you recommend going about learning vba?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    As for learning VBA you can start with playing around with the MsgBox examples I linked to. Playing around with test DB's that have one table and one form is a good way to practice some theories. You can continue to create new forms and associate them to the one table, each new form using a different type of control and or a new line of VBA.

    As for your current problem, I really don't know how to get what you need using macros or telling Access to cancel a macro. I might be able to figure something out if you are able to clear private data and upload your DB here.

  5. #5
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    as for my current problem, i just went around it by making annotations in my help file. if the user was too dumb to read it, not my problem. basically right now there's only two people using this database. me and another guy. sooner or later though somebody is gonna replace me, and i don't know how smart that person is gonna be....

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Well, at least you got what you need for now. It really does boil down to how much time you have to learn Access. If you devote time to Macros, you will not get the best bang for your buck in the long haul compared to going the VBA route.

  7. #7
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    Here's a copy of it. I don't have any personal information in there yet. Just a couple of test profiles.

    Background: I'm active duty USMC. There's an order out there that basically says too many Marines are dying on Motorcycles, you will start a "club" like organization blah blah blah. Basically I took the excel spread sheet they were using a while back and started a database, for the purpose of tracking the information we're required to keep, and help track who's expired in what. Also we're required to have a meeting once a month, and have a "safety" (read: get a free day off work to go ride the motorcycle) ride once a month, and the boss wants those tracked too.

    So at work i finally got the upgrade from windows xp to windows 7, which came with office 10 (coming from 07), which plays friendly with my access 13 at home. so between that, and all my previous revisions, i decided to start from scratch on the infrastructure, and just append the data from my old one later. so yea this one has no info in it. just bare bones.

    but anyways, yea i'm open to hearing what you think as far as it's mechanics. just know the basic info i've set up is what i need to track.

    forgot to mention i hadn't gotten to making the welcome screen or anything yet. i just copied and pasted the "privacy warning" cause that's all i needed to do with it. and have it open to that form. I tried a message box but it's too many characters. so it's still kind of disorganized but what is there should be working right. with the exception of one of the forms i think is still blank.
    Attached Files Attached Files
    Last edited by ck4794; 10-19-2013 at 06:34 PM. Reason: forgot to mention...

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Well, we don't want any Marines out there damaging government property by having an MC accident. I will have a look.

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Here is some stuff I came up with.


    MCDB.zip


    Go ahead and read the notes I placed in the two word docs. The sample DB will hopefuly give you an idea of what I am talking about. You will most definately have questions so...

  10. #10
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    I look forward to checking it out. But today I'm on barracks duty. Limited to the phone

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Running Queries from a form
    By HaYuM in forum Queries
    Replies: 1
    Last Post: 08-23-2013, 03:12 AM
  2. Running queries, VIA VB, but not running in Order
    By mike02 in forum Programming
    Replies: 6
    Last Post: 06-01-2013, 07:07 AM
  3. Running multiple queries in form
    By daniejm in forum Forms
    Replies: 3
    Last Post: 01-02-2013, 08:45 AM
  4. Running sum in queries
    By sankarkunnath in forum Queries
    Replies: 0
    Last Post: 10-24-2010, 12:26 PM
  5. Running parameter queries from VBA
    By John Southern in forum Programming
    Replies: 6
    Last Post: 03-25-2010, 10:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums