From: Mommybear on
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
> <Mommybear(a)discussions.microsoft.com> 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]
>
> .
>
From: John W. Vinson on
On Tue, 11 May 2010 05:24:01 -0700, Mommybear
<Mommybear(a)discussions.microsoft.com> 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]
From: Mommybear on
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
> <Mommybear(a)discussions.microsoft.com> 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]
> .
>
From: Mommybear on
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
> > <Mommybear(a)discussions.microsoft.com> 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]
> > .
> >