Drop down question

G

Guest

I have a form with a drop down list to find a file. If I delete a file the
drop down list shows "Deleted" and if I add a file, the add does not show up
unless I close the form and reopen it. I am sure there is a way to update the
drop down list but I do not know how. Help would be appreciate.
 
B

Brian Bastl

Hi Nick,

what is the SQL of your Delete query, and are you running it with code, or
just running the query from the DB window?

If you were doing this from your form on which the combobox resides, you'd
generally use a command button. The basic structure of the code would be:

Private Sub cmdDeleteButton_Click()
CurrentDb.Execute "DELETE * FROM SomeTable", dbFailOnError
Me.MyCombo.Requery
End Sub

Brian
 

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

Top