delete table

TjS

Registered User.
Local time
Today, 15:02
Joined
Jul 18, 2007
Messages
126
little question here:

1) table deleting
i have a table in which temporary data is stored;
With a command button i want to delete the table (or maybe just the data in it);

2) information from table in textbox
In a form i have a textbox in which the data is mentioned from the table, after clicking the delete table button, i want also the texbox to be empty

First i tried to put the following code behind the onclick event but doesn't seem to work(?)
Code:
DoCmd.DeleteObject acTable, tTable

It should be quite simple (i think?); please advise,

Thanks
 
I would suggest NOT deleting the table but using a Delete query to empty the table. It will help your database to not bloat as much as if you created the table each time.

Also, to set the text box to clear use

Me.YourTextBoxNameHere = ""

And be sure to put the code in the correct place (not in the PROPERTIES dialog, but in the VBA Code Window).
 

Users who are viewing this thread

Back
Top Bottom