Results 1 to 2 of 2
  1. #1
    SteveApa is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    89

    Running Code from a Make Table Query

    Hi All.

    I am trying to run a function from a make table query. The make table just pulls in one line from a one line table and runs the code. The purpose of this is so I can see the date the query ran.

    The code is to uncrosstab a crosstabed result. In the function I try to execute:
    DoCmd.RunSQL "Delete * FROM [" & output_name & "]" to delete the output table before I repopulate it.



    I get the error: 2486, You can't carry out this action at the present time."

    Why can I not execute this SQL while the make table is running??

    Thanks.
    Steve

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    You can't empty a pot while you're creating it, just write a procedure that first empties the destination table and then run an append query to repopulete it or you can first drop the table and then recreate it with a make table query.

    kind regards
    Noëlla

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

Similar Threads

  1. Replies: 3
    Last Post: 03-05-2015, 12:51 PM
  2. Replies: 2
    Last Post: 02-17-2015, 01:01 PM
  3. How to turn off prompt when running append query from code
    By GraeagleBill in forum Programming
    Replies: 5
    Last Post: 07-22-2013, 03:35 PM
  4. Replies: 6
    Last Post: 03-02-2012, 12:33 AM
  5. Running a make table query
    By rohini in forum Forms
    Replies: 5
    Last Post: 02-22-2012, 11:32 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