I have a form and a combo box that I use to filter the form to particular records. I also have an "add new" button that, when clicked, adds a new record. My problem is that the filter combo box stays on the old selection when the new record pops up. I would like to have the combo box clear or set to a default value of "New" when the Add New button is clicked or when the user clicks on the * (new record) button in the navigation bar.
The On Click event code for my add new button is currently:
Expand|Select|Wrap|Line Numbers
- Private Sub btnAddSiteVisit_Click()
- On Error GoTo Err_btnAddSiteVisit_Click
- DoCmd.GoToRecord , , acNewRec
- Exit_btnAddSiteVisit_Click:
- Exit Sub
- Err_btnAddSiteVisit_Click:
- MsgBox Err.Description
- Resume Exit_btnAddSiteVisit_Click
- End Sub
Bridget