By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

delete all records

P: n/a
I have created a form with 7 fields which is linked to one table. Is there
anyway to delete all records in the table from the form?

Thanks
Kevin


Oct 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Kevin,

Just place a command button on the form. Then in the code for the
command button add something like this:

Private Sub Command1_Click()
DoCmd.RunSql "Delete * from Table1"
Me.Requery
End Sub

This will delete all the rows in Table1 which we will assume is the
table underlying your form. This code will delete all the rows in a
table called Table1 whether it is underlying your form or not.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Oct 23 '06 #2

P: n/a

"Rich P" <rp*****@aol.comwrote in message
news:45*********************@news.qwest.net...
Hi Kevin,

Just place a command button on the form. Then in the code for the
command button add something like this:

Private Sub Command1_Click()
DoCmd.RunSql "Delete * from Table1"
Me.Requery
End Sub

This will delete all the rows in Table1 which we will assume is the
table underlying your form. This code will delete all the rows in a
table called Table1 whether it is underlying your form or not.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Thank you so very much
Oct 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.