M
mattc66 via AccessMonster.com
I need to delete the data in 10 tables prior to uploading new data. I would
like to have this as a button on a form. I have created the button and added
the click event. When I add the SQL statement I get lost in the syntax.
In looking at other help on this site – I found how to execute a SQL
statement in VB:
DoCmd.RunSQL
In a query I see the proper syntax to Delete the Data as follows:
DELETE tableName.*
FROM tableName;
When I put this all together in VB it fails.
How do I run a SQL Delete statement in VB. I will need to repeat this
statement for each table.
I know I could do this with a Query and then do a DoCmd.RunQuery – I wanted
to reduce the query step.
Thanks
Matt
like to have this as a button on a form. I have created the button and added
the click event. When I add the SQL statement I get lost in the syntax.
In looking at other help on this site – I found how to execute a SQL
statement in VB:
DoCmd.RunSQL
In a query I see the proper syntax to Delete the Data as follows:
DELETE tableName.*
FROM tableName;
When I put this all together in VB it fails.
How do I run a SQL Delete statement in VB. I will need to repeat this
statement for each table.
I know I could do this with a Query and then do a DoCmd.RunQuery – I wanted
to reduce the query step.
Thanks
Matt