click command button to delete a record which is selected from a combo box ?

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

In a form's [combo], I can select one of the combo choices and then click a
command button nearby(designed by me) to activate a filt. The command
button's VBA is like below:

Me.Filter = "business NO like '" & Me![Combo270] & "'"
Me.FilterOn = True

YET, my question is:

I want to create another command button (when I click the button) to
delete the record which I have selected from the [combo]. --- How is the
VBA about this command button should be ?

Thanks!

Martin
 
Martin,

I am pretty sure I understand. Try something like this?...

CurrentDb.Execute "DELETE * FROM YourTable WHERE business ='" &
Me![Combo270] & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top