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  

Clear Unbound Text box used as input parameter to query



 
 
Thread Tools Display Modes
  #11  
Old May 11th, 2010, 01:24 PM posted to microsoft.public.access.forms
Mommybear
external usenet poster
 
Posts: 37
Default Clear Unbound Text box used as input parameter to query

Not a problem. I'm new to this so I wasn't sure if my answer was actually
what you were looking for.

I tried the Repaint too and that didn't work. I did notice yesterday while
experimenting that it looks like it is not doing the code but instead is
running an embedded macro which turns on the hourglass while runnung. Not
sure how to change this to run the VBA code.
In addition to resetting this field after the form populates, I would also
eventually like to reset the whole form when I click the search command
button. But one step at a time.


"John W. Vinson" wrote:

On Mon, 10 May 2010 12:10:01 -0700, Mommybear
wrote:

John, I thought I answered your question.


The Microsoft website has been losing a lot of posts... sorry for the lame
attempt at humor; I should have realized it was the web interface messing up
again!

I'm adding this code on the Search
command button, not the unbound text box. My unbound text box is "InputEPI"
and my search button is "SearchEPICode". This is what my command button
looks like:

Private Sub SearchEPICode_Click()

Me.Requery
Me.InputEPI = Null

End Sub


And it's not making InputEPI go blank? That's odd. Try adding a line

Me.Repaint

after the =Null line.
--

John W. Vinson [MVP]

.

  #12  
Old May 11th, 2010, 04:44 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Clear Unbound Text box used as input parameter to query

On Tue, 11 May 2010 05:24:01 -0700, Mommybear
wrote:

I tried the Repaint too and that didn't work. I did notice yesterday while
experimenting that it looks like it is not doing the code but instead is
running an embedded macro which turns on the hourglass while runnung. Not
sure how to change this to run the VBA code.
In addition to resetting this field after the form populates, I would also
eventually like to reset the whole form when I click the search command
button. But one step at a time.


If you open the form in design view and look at its Properties, what is on
this event's line? For the code to run it should be [Event Procedure]. Try
deleting the macro and changing it to that.
--

John W. Vinson [MVP]
  #13  
Old May 11th, 2010, 06:51 PM posted to microsoft.public.access.forms
Mommybear
external usenet poster
 
Posts: 37
Default Clear Unbound Text box used as input parameter to query

When I do this, nothing happens. It just sits and stares at me. I just
don't get it.

"John W. Vinson" wrote:

On Tue, 11 May 2010 05:24:01 -0700, Mommybear
wrote:

I tried the Repaint too and that didn't work. I did notice yesterday while
experimenting that it looks like it is not doing the code but instead is
running an embedded macro which turns on the hourglass while runnung. Not
sure how to change this to run the VBA code.
In addition to resetting this field after the form populates, I would also
eventually like to reset the whole form when I click the search command
button. But one step at a time.


If you open the form in design view and look at its Properties, what is on
this event's line? For the code to run it should be [Event Procedure]. Try
deleting the macro and changing it to that.
--

John W. Vinson [MVP]
.

  #14  
Old May 12th, 2010, 03:24 PM posted to microsoft.public.access.forms
Mommybear
external usenet poster
 
Posts: 37
Default Clear Unbound Text box used as input parameter to query

I finally got it to work. Apparently, my VBA code wasn't running because of
a security setting couldn't be enabled. Now that I got that figured out,
this works great. Thank you for all your help and understanding.

"Mommybear" wrote:

When I do this, nothing happens. It just sits and stares at me. I just
don't get it.

"John W. Vinson" wrote:

On Tue, 11 May 2010 05:24:01 -0700, Mommybear
wrote:

I tried the Repaint too and that didn't work. I did notice yesterday while
experimenting that it looks like it is not doing the code but instead is
running an embedded macro which turns on the hourglass while runnung. Not
sure how to change this to run the VBA code.
In addition to resetting this field after the form populates, I would also
eventually like to reset the whole form when I click the search command
button. But one step at a time.


If you open the form in design view and look at its Properties, what is on
this event's line? For the code to run it should be [Event Procedure]. Try
deleting the macro and changing it to that.
--

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 09:56 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.