A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Resetting a form



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2004, 08:57 PM
mike
external usenet poster
 
Posts: n/a
Default Resetting a form

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!
  #2  
Old July 14th, 2004, 09:16 PM
Rick B
external usenet poster
 
Posts: n/a
Default Resetting a form

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




"mike" wrote in message
...
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!


  #3  
Old July 14th, 2004, 10:11 PM
external usenet poster
 
Posts: n/a
Default Resetting a form

Thanks!!

-----Original Message-----
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




"mike" wrote in message
...
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!


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Records Melissa Lambino New Users 6 July 20th, 2004 04:51 AM
Modal form Praveen Manne Using Forms 1 July 6th, 2004 10:49 PM
Modal form Praveen Manne General Discussion 1 July 6th, 2004 10:49 PM
surely a form with a ListBox can be used in a query? 1.156 Running & Setting Up Queries 14 June 2nd, 2004 04:54 PM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 04:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.