Bjoern Jackschina wrote:
Hello,
I want to mark in a list of many datasets which could delete. Maybe it
is possible with checkboxes but I have endless form. Perhaps somebody
has an idea.
Thank you
Bjoem,
Add a CheckBox field to your table, then include that field on your
form.
Add a command button to the form header or footer.
Code the command button click event:
DoCmd.RunSQL "DELETE TableName.*, TableName.CheckBoxName FROM TableName
WHERE (((TableName.CheckBoxName)=True));"
The above should be on one line.
Change TableName and CheckBoxName to whatever the actual table and field
name are.
Enter a check mark into each record you wish to delete.
Click the command button.
You will be warned about deleteing records. If you wish to delete them,
click OK otherwise click No.
To avoid the warning message completely, change
the DoCmd.RunSQL line to :
CurrentDb.Execute "DELETE Tablename.*, TableName.checkBoxField FROM
TableName WHERE (((TableName.CheckBoxname)=True));", dbFailOnError
The records will be deleted without any additional warning.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.