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  

Reset Switchboard search control



 
 
Thread Tools Display Modes
  #1  
Old January 1st, 2010, 09:50 PM posted to microsoft.public.access.forms
Pamela
external usenet poster
 
Posts: 193
Default Reset Switchboard search control

I have an unbound text box on my switchboard into which users put criteria
which is then used to find the corresponding records. When the OnClick event
of the command button fires, I want the text box to reset itself - deleting
the previously entered value and making the field empty and ready for new
input which again can be searched. I've tried using Me.Text2.Requery and
Me.Text2.Undo but neither of these seem to work. I've even Me.Text2 = " "
and while it does make the field blank, when the user then inputs data to
search again, the system doesn't find a match. Thanks so much for any help!

Pamela
  #2  
Old January 1st, 2010, 09:58 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Reset Switchboard search control

On Fri, 1 Jan 2010 13:50:01 -0800, Pamela
wrote:

I have an unbound text box on my switchboard into which users put criteria
which is then used to find the corresponding records. When the OnClick event
of the command button fires, I want the text box to reset itself - deleting
the previously entered value and making the field empty and ready for new
input which again can be searched. I've tried using Me.Text2.Requery and
Me.Text2.Undo but neither of these seem to work. I've even Me.Text2 = " "
and while it does make the field blank, when the user then inputs data to
search again, the system doesn't find a match. Thanks so much for any help!

Pamela


Me.Text2 = Null

should work, if it's applied *after* the search has been run; obviously if you
apply it too soon you'll simply erase the criterion entered by the user.

Perhaps you could post your actual code, including the SQL view of the query.
--

John W. Vinson [MVP]
  #3  
Old January 1st, 2010, 10:05 PM posted to microsoft.public.access.forms
Pamela
external usenet poster
 
Posts: 193
Default Reset Switchboard search control

I decided to code the Switchboard to close and then reopen which resets the
unbound text box. Thanks!

"Pamela" wrote:

I have an unbound text box on my switchboard into which users put criteria
which is then used to find the corresponding records. When the OnClick event
of the command button fires, I want the text box to reset itself - deleting
the previously entered value and making the field empty and ready for new
input which again can be searched. I've tried using Me.Text2.Requery and
Me.Text2.Undo but neither of these seem to work. I've even Me.Text2 = " "
and while it does make the field blank, when the user then inputs data to
search again, the system doesn't find a match. Thanks so much for any help!

Pamela

  #4  
Old January 1st, 2010, 11:32 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Reset Switchboard search control

On Fri, 1 Jan 2010 14:05:01 -0800, Pamela
wrote:

I decided to code the Switchboard to close and then reopen which resets the
unbound text box. Thanks!


Well, you can crack nuts with a hydraulic ram too... but a nutcracker is more
appropriate.

Me.textbox = Null

will work fine.
--

John W. Vinson [MVP]
 




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


All times are GMT +1. The time now is 02:26 AM.


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