Results 1 to 3 of 3

Thread: DeleteQueryDef in Access95

  1. #1
    Roisin Mullan Guest

    DeleteQueryDef in Access95

    I have an old Access2 database that I want to convert to Access95 but I don't know what to use instead of db.DeleteQueryDef "queryname". Basically, I've got a filter form which creates a query using db.CreateQueryDef "queryname", sql), however if the query already exists (ie. the filter has been run already, I first need to delete the existing query then create the new one.

    Has anyone any ideas? I've tried db.Delete queryname, and variations of the same, but I'm still having no success.

    Thanks
    Roisin

  2. #2
    Sumit Guest

    DeleteQueryDef in Access95 (reply)

    Try this -

    Currentdb.Execute “DROP QUERY <queryname>;”

    ------------
    Roisin Mullan at 7/30/99 7:56:52 AM

    I have an old Access2 database that I want to convert to Access95 but I don&#39;t know what to use instead of db.DeleteQueryDef &#34;queryname&#34;. Basically, I&#39;ve got a filter form which creates a query using db.CreateQueryDef &#34;queryname&#34;, sql), however if the query already exists (ie. the filter has been run already, I first need to delete the existing query then create the new one.

    Has anyone any ideas? I&#39;ve tried db.Delete queryname, and variations of the same, but I&#39;m still having no success.

    Thanks
    Roisin

  3. #3
    Sumit Guest

    Sorry, there was a mistake


    correct code would be

    Currentdb.Execute “DROP TABLE <queryname>;”


    ------------
    Sumit at 9/20/99 4:23:38 PM

    Try this -

    Currentdb.Execute “DROP QUERY <queryname>;”

    ------------
    Roisin Mullan at 7/30/99 7:56:52 AM

    I have an old Access2 database that I want to convert to Access95 but I don&#39;t know what to use instead of db.DeleteQueryDef &#34;queryname&#34;. Basically, I&#39;ve got a filter form which creates a query using db.CreateQueryDef &#34;queryname&#34;, sql), however if the query already exists (ie. the filter has been run already, I first need to delete the existing query then create the new one.

    Has anyone any ideas? I&#39;ve tried db.Delete queryname, and variations of the same, but I&#39;m still having no success.

    Thanks
    Roisin

Posting Permissions

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