View Single Post
  #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]

.