Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2004
    Posts
    16

    Question Unanswered: delete and update queries

    When I checkmark an item, i want to move it from the current table to another table. so i'm guessing i need to first run an append query to Table2 and then a delete query from Table 1 right? well it does that but i get these messages "you are about to append.." and "you're about to delete x records"

    is there any way to disable these messages and run the queries without being required to click OK?

    Thanks..

    LK

  2. #2
    Join Date
    Jul 2004
    Posts
    16
    ^ sorry, title should read Delete and Append Queries

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    DoCmd.SetWarnings False
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jul 2004
    Posts
    16
    thanks, it worked

  5. #5
    Join Date
    Jul 2004
    Posts
    16
    ok, i've got another one... when i run the append and delete queries, is there anyway i can pass a value to it so that it doens't prompt me for hte value?
    for example, i want to pass the ID number of the record i am viewing in a form.

    thnx..

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by lastknightess
    ok, i've got another one... when i run the append and delete queries, is there anyway i can pass a value to it so that it doens't prompt me for hte value?
    for example, i want to pass the ID number of the record i am viewing in a form.

    thnx..
    Build it into the query ...
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Jul 2004
    Posts
    16
    Owen,

    i'm not sure how to go about it. can you pls elaborate?

    the ID is the primary key in my table, and when i run the append query, it automatically prompts me for an ID. what i want to do is, when i view the details for a specific ID, and click on the update button, i want it to automatically process the append and delete queries for that specific ID instead of prompting me to enter it again.

    i was looking into passing the ID as an argument to the Click function( in teh Event section of the Update Button). am i making it harder than it's sposed to be or what?


  8. #8
    Join Date
    Jul 2004
    Posts
    16
    ^bump.

    no replies?

  9. #9
    Join Date
    Jul 2004
    Posts
    34

    How about this...

    Its a personal preference, but I'd use VBA. I've only just got into it of late, but the power it affords over data processing and calculation over numerous queries is very great - plus you can debug to check everything works as required...

    That way you can write a function to do the moves - use the recordset method - and that way you can carry the ID into the function as a parameter through the click actioc event.
    Basically, in the click event put fncMoveData(controlvalue-ID), and it will run the function, and no more twiddling with queries.

  10. #10
    Join Date
    Jul 2004
    Posts
    16
    that's what i thought of doing, but i'm not sure how to write the code.
    i'll try it..

    thanks

  11. #11
    Join Date
    Jul 2004
    Posts
    16
    ok, i've got it
    it was quite simple really, as can be done in the query itself as Owen said.

    In the append and delete queries, set the criteria to Form!Name_of_Form!Field

    Thanks to everyone who helped

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •