Subj: Qdf MakeTable Asks Delet Section: SQL Queries To: Michael D. Miller, 76130,1734 Saturday, November 07, 1998 6:15:45 PM From: Calvin G. Smith, 102226,2127 #723081 Hi Michael! >>> I have four queries to execute in sequence, one MakeTable, and three appends. I got the make table qdf qry to run, using Execute, but it tells me that the table will be deleted and when I press OK (which I don't want to see anyway), it stops. I remembered SETWARNINGS and set it to false at the beginning of the run and true at the end...It still brings up the msg. How do I stop it? <<< You might want to consider dropping the table via SQL (e.g. Drop Table tblMyTableName) prior to the make-table query running. Calvin Smith - Sr. Visual Basic/MS Access Consultant ******************************************************** http://www.CalvinSmithSoftware.com ******************************************************** ----------------------------------------------------------------------------------------------- Subj: Qdf MakeTable Asks Delet Section: SQL Queries To: Calvin G. Smith, 102226,2127 Sunday, November 08, 1998 5:43:12 AM From: Michael D. Miller, 76130,1734 #723100 >>You might want to consider dropping the table via SQL (e.g. Drop Table tblMyTableName) prior to the make-table query running.<< Calvin, Thank you. I did learn that in DAO, a maketable will not replace an existing table, so I have to delete the table or empty it and refill it. Help was not clear on this and there are no examples in Help of using DAO to delete a table. Michael ----------------------------------------------------------------------------------------------- Subj: Qdf MakeTable Asks Delet Section: SQL Queries To: Michael D. Miller, 76130,1734 Monday, November 09, 1998 12:11:28 AM From: Calvin G. Smith, 102226,2127 #723133 >>> Thank you. <<< You're welcome! :-) >>> Help was not clear on this and there are no examples in Help of using DAO to delete a table. <<< Well, use / modify the following code, if you would like: Function DropATable(strAnyTable As String) As Integer '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Author: Calvin Smith ' ' WEB page: www.CalvinSmithSoftware.com/ ' 'Environment: MS Access v8.0 ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' On Error GoTo DropATable_Err ' ' ----------------------------------------------------------------------- ' Purpose: Quickly delete any MS Access table ' ' Accepts: The passed in string variable strAnyTable$ for the ' Drop statement below ' ' Returns: True if successful; otherwise False ' ' Example: iRetVal% = DropATable("tblMyTableName") ' ----------------------------------------------------------------------- ' Dim ThisDB As Database Dim strSQL As String Set ThisDB = CurrentDb strSQL$ = "DROP TABLE " & strAnyTable$ ThisDB.Execute strSQL$ DropATable = (Err = 0) DropATable_Exit: Exit Function DropATable_Err: If Err Then 'Do whatever else you need to do, here! Resume DropATable_Exit End If End Function Calvin Smith - Sr. Visual Basic/MS Access Consultant ******************************************************** http://www.CalvinSmithSoftware.com ********************************************************