J
Jason Gyetko
I created the following function to clear the data in my database tables.
It works fine for tables with single word titles, but if there are titles
with two words seperated by a space like, Call ClearTables("Two Words"),
then I get the following message: "The Microsoft Jet database engine cannot
find the table or query 'Two'. Make sure it exists and that its name is
spelled correctly". How do I get it to accept tables with spaces in their
names? Thanks in advance.
Function ClearTables(TableName As String)
DoCmd.RunSQL ("Delete From " & TableName)
End Function
It works fine for tables with single word titles, but if there are titles
with two words seperated by a space like, Call ClearTables("Two Words"),
then I get the following message: "The Microsoft Jet database engine cannot
find the table or query 'Two'. Make sure it exists and that its name is
spelled correctly". How do I get it to accept tables with spaces in their
names? Thanks in advance.
Function ClearTables(TableName As String)
DoCmd.RunSQL ("Delete From " & TableName)
End Function