beginner questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello
got a table called "temp table"
try to delete with the command: docmd.deleteobject (actable,"temp table")
but something is missing and i don't know what

can u also tell me how to execute a macro
i have try: docmd.runmacro ("macroname")
but something is missing again..

sorry being sow thick, but i don't have help at all

thank u
 
In your macro, choose the RunSQL action.

In the lower pane, enter:
DROP TABLE [temp table];


BTW, if the table structure is constant, it might be easier just to delete
all the records and then populate it again with an Append query rather than
a Make Table query. The main advantage is that you can set up the fields the
way you want rather than however the MakeTable generates them. To remove all
the records without destroying the table, the RunSQL is:
DELETE FROM [temp table];
 
hello
got a table called "temp table"
try to delete with the command: docmd.deleteobject (actable,"temp table")
but something is missing and i don't know what

can u also tell me how to execute a macro
i have try: docmd.runmacro ("macroname")
but something is missing again..

sorry being sow thick, but i don't have help at all

thank u

What do you mean by "something is missing"? I just created a table
and ran this:

Function DelTbl()
DoCmd.DeleteObject acTable, "temp table"
End Function

It worked just fine. Are you getting an error? Is the table not
getting deleted?
 
Back
Top