Resetting a form

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

I have created a form, when I open the form and click on a
text box, and then use the find function, Access does
exactly what it should do. When I close the form and then
reopen the form, the text box contains the words used for
the last search. What I want to do is reset the form to be
blank, either by closing the form, or adding a "Clear"
button. Any help?

Thanks in advance!
 
Just include a line to clear the field in your search even procedure. Here
is what the code from my form looks like...


Private Sub FindReference_AfterUpdate()
On Error Resume Next

' Find the record that matches the control.
DoCmd.GoToControl "Reference"
DoCmd.FindRecord Me!FindReference

' Clear FIND combo box
Me!FindReference.Value = ""
DoCmd.GoToControl "InstallDate"

End Sub


Rick B




I have created a form, when I open the form and click on a
text box, and then use the find function, Access does
exactly what it should do. When I close the form and then
reopen the form, the text box contains the words used for
the last search. What I want to do is reset the form to be
blank, either by closing the form, or adding a "Clear"
button. Any help?

Thanks in advance!
 
Back
Top