combo box and macro based on a delete action query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able for a user to make a selection from the drop down menu on
a form and then delete that particular record after clicking on a button
(control) where a macro is based on a delete action query which is attached
to its on click property.

Is this action possible?

Any ideas?

If code is involved, can you instruct on exactly how to use it? I don't
have much experience with code in Access.

Thank you in advance.
 
Hi,
you don't really need a macro for this.
Just use the buttons on click event with a delete statement e.g.:

CurrentDb.Execute "Delete * From YourTable Where YourField=" & Me.YourCombo,
dbFailOnError

You might need to adjust the statement depending on if the combo value is a
text or number type and if the bound column is the value you want to pass or
not.
HTH
Good luck
 
Back
Top