Results 1 to 4 of 4
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Excising a query from a MS access 2010 db

    When one makes an INSERT INTO query, I would like to know if also creates a macro. I am trying to get rid of a outdated query and I noticed that
    there is a macro in the macro section that is very similar to parts of the query. I just want to know if getting rid of the query, that I can get rid of the
    macro as well.

    Any help appreciated. Thinks in advance.



    Respectfully,

    Lou Reed

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    No, deleting a query with not delete a Macro, or vice versa. They are independent objects.
    Nor will running an INSERT QUERY create a Macro. Macros are created manually.
    You will need to delete both the Query and Macro. VBA code could be created to delete objects.

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Thanks for your help. The statement that you made:

    Code:
     VBA code could be created to delete objects.
    Do you have a reference for this? I am going to be cleaning up a project by removing all of the extra tables, forms and queries that I put in.

    They are obviously not needed. However in this process of cleaning up unneeded controls, I do not want to eliminate needed controls. I have a good
    idea of what is in the db and what is needed and what is not needed. But it is not perfect.

    Thus some system might work and if I use VBA code with this system, then that would be even better.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sure. Use the DeleteObject command. Actually, it looks like it can be used in Macros as well as VBA.
    See:
    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx
    and note this link how to reference the different object types:
    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

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

Similar Threads

  1. MS Access 2010 query help
    By Lanwe in forum Queries
    Replies: 5
    Last Post: 05-19-2016, 12:19 PM
  2. Replies: 5
    Last Post: 01-07-2016, 12:49 PM
  3. Replies: 1
    Last Post: 12-14-2015, 04:26 PM
  4. Replies: 6
    Last Post: 07-07-2014, 09:13 AM
  5. Replies: 0
    Last Post: 07-31-2012, 12:25 PM

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