C Charlie Oct 22, 2003 #1 How can I determine if a table exists programically? I want to make sure a table exists before deleting it.
How can I determine if a table exists programically? I want to make sure a table exists before deleting it.
R Ron Weiner Oct 22, 2003 #2 Why not just drop the table and trap for the error if it didn't exist? Ron W
N Nikolai Novikov Oct 23, 2003 #3 Using the application object dn catching the error for ADP Application.CurrentProject.AllForms.Item(<Form_Name>).Name for MDB Application.CurrentDB.AllForms.Item(<Form_Name>).Name
Using the application object dn catching the error for ADP Application.CurrentProject.AllForms.Item(<Form_Name>).Name for MDB Application.CurrentDB.AllForms.Item(<Form_Name>).Name
J Jim/Chris Oct 23, 2003 #4 I agree with the rest just delete the table and continue on with any other processing. Here is some code example Private sub....... On Error Resume Next DoCmd.DeleteObject acTable, "tablename1" DoCmd.DeleteObject acTable, "tablename2" ' Insert your other processing needs Update_Data_Exit: Exit Function Update_Data_Err: MsgBox Error$ Resume Update_Data_Exit ens sub Jim
I agree with the rest just delete the table and continue on with any other processing. Here is some code example Private sub....... On Error Resume Next DoCmd.DeleteObject acTable, "tablename1" DoCmd.DeleteObject acTable, "tablename2" ' Insert your other processing needs Update_Data_Exit: Exit Function Update_Data_Err: MsgBox Error$ Resume Update_Data_Exit ens sub Jim