PC Review


Reply
Thread Tools Rate Thread

Clear Unbound Text box used as input parameter to query

 
 
Mommybear
Guest
Posts: n/a
 
      29th Apr 2010
I've looked at everything I can find, tried all the suggestions but still
can't get this to work. I have a form that opens blank. You input your
parameter into an unbound text box then press a command button that performs
a requery of the database and returns the results in a continuous form. When
the results are returned, the parameter is listed as part of the detail in
the form so I want the parameter box to be cleared out and ready for the next
one.

My command on the Search button looks like this:

Private Sub SearchEPICode_Click()

Me.Requery

End Sub

I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
the wrong place.
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      29th Apr 2010
On Thu, 29 Apr 2010 13:31:01 -0700, Mommybear
<(E-Mail Removed)> wrote:

>I've looked at everything I can find, tried all the suggestions but still
>can't get this to work. I have a form that opens blank. You input your
>parameter into an unbound text box then press a command button that performs
>a requery of the database and returns the results in a continuous form. When
>the results are returned, the parameter is listed as part of the detail in
>the form so I want the parameter box to be cleared out and ready for the next
>one.
>
>My command on the Search button looks like this:
>
>Private Sub SearchEPICode_Click()
>
> Me.Requery
>
>End Sub
>
>I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
>the wrong place.


Probably. You don't say where you're adding it!

I presume that the textbox named InputEPI has no Control Source, right? What
do you mean by "the parameter is listed as part of the detail"?
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
 
Beetle
Guest
Posts: n/a
 
      29th Apr 2010
Well, Me!ZInputEPI = Null *should* work, but if it's not
you might try following it with a Me.Repaint. You might
also try;

Me!InputEPI = ""
--
_________

Sean Bailey


"Mommybear" wrote:

> I've looked at everything I can find, tried all the suggestions but still
> can't get this to work. I have a form that opens blank. You input your
> parameter into an unbound text box then press a command button that performs
> a requery of the database and returns the results in a continuous form. When
> the results are returned, the parameter is listed as part of the detail in
> the form so I want the parameter box to be cleared out and ready for the next
> one.
>
> My command on the Search button looks like this:
>
> Private Sub SearchEPICode_Click()
>
> Me.Requery
>
> End Sub
>
> I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
> the wrong place.

 
Reply With Quote
 
Mommybear
Guest
Posts: n/a
 
      30th Apr 2010
That is correct, it does NOT have a control source. The parameter is used to
search a field on my query, when it returns, the query field is displayed on
my form which happens to be the same as the parameter.




"John W. Vinson" wrote:

> On Thu, 29 Apr 2010 13:31:01 -0700, Mommybear
> <(E-Mail Removed)> wrote:
>
> >I've looked at everything I can find, tried all the suggestions but still
> >can't get this to work. I have a form that opens blank. You input your
> >parameter into an unbound text box then press a command button that performs
> >a requery of the database and returns the results in a continuous form. When
> >the results are returned, the parameter is listed as part of the detail in
> >the form so I want the parameter box to be cleared out and ready for the next
> >one.
> >
> >My command on the Search button looks like this:
> >
> >Private Sub SearchEPICode_Click()
> >
> > Me.Requery
> >
> >End Sub
> >
> >I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
> >the wrong place.

>
> Probably. You don't say where you're adding it!
>
> I presume that the textbox named InputEPI has no Control Source, right? What
> do you mean by "the parameter is listed as part of the detail"?
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
Mommybear
Guest
Posts: n/a
 
      30th Apr 2010
None of these worked. I just want to clarify that I'm putting these on the
command button. Is that where I'm suppose to do this or should it be
someplace else.

"Beetle" wrote:

> Well, Me!ZInputEPI = Null *should* work, but if it's not
> you might try following it with a Me.Repaint. You might
> also try;
>
> Me!InputEPI = ""
> --
> _________
>
> Sean Bailey
>
>
> "Mommybear" wrote:
>
> > I've looked at everything I can find, tried all the suggestions but still
> > can't get this to work. I have a form that opens blank. You input your
> > parameter into an unbound text box then press a command button that performs
> > a requery of the database and returns the results in a continuous form. When
> > the results are returned, the parameter is listed as part of the detail in
> > the form so I want the parameter box to be cleared out and ready for the next
> > one.
> >
> > My command on the Search button looks like this:
> >
> > Private Sub SearchEPICode_Click()
> >
> > Me.Requery
> >
> > End Sub
> >
> > I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
> > the wrong place.

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      2nd May 2010
On Fri, 30 Apr 2010 06:25:01 -0700, Mommybear
<(E-Mail Removed)> wrote:

>None of these worked. I just want to clarify that I'm putting these on the
>command button. Is that where I'm suppose to do this or should it be
>someplace else.
>


Please post the names and code of all the relevant controls.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Mommybear
Guest
Posts: n/a
 
      10th May 2010
I still can not get this working, can someone please help.

"Mommybear" wrote:

> I've looked at everything I can find, tried all the suggestions but still
> can't get this to work. I have a form that opens blank. You input your
> parameter into an unbound text box then press a command button that performs
> a requery of the database and returns the results in a continuous form. When
> the results are returned, the parameter is listed as part of the detail in
> the form so I want the parameter box to be cleared out and ready for the next
> one.
>
> My command on the Search button looks like this:
>
> Private Sub SearchEPICode_Click()
>
> Me.Requery
>
> End Sub
>
> I've tried adding Me!InputEPI = Null but nothing works. Am I adding it to
> the wrong place.

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      10th May 2010
On Mon, 10 May 2010 08:41:02 -0700, Mommybear
<(E-Mail Removed)> wrote:

>I still can not get this working, can someone please help.
>


"Doctor, I don't feel good, what should I take?"

As I asked on the 1st (and got no answer):

Please post your code and the names of the relevant controls.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Mommybear
Guest
Posts: n/a
 
      10th May 2010
John, I thought I answered your question. 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



"John W. Vinson" wrote:

> On Mon, 10 May 2010 08:41:02 -0700, Mommybear
> <(E-Mail Removed)> wrote:
>
> >I still can not get this working, can someone please help.
> >

>
> "Doctor, I don't feel good, what should I take?"
>
> As I asked on the 1st (and got no answer):
>
> Please post your code and the names of the relevant controls.
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      10th May 2010
On Mon, 10 May 2010 12:10:01 -0700, Mommybear
<(E-Mail Removed)> 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]

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to create an unbound Subform related to an unbound Text Box Larry Linson Microsoft Access Form Coding 0 22nd Jan 2010 10:05 PM
Clear contents of an unbound text box on a bound form. Dave K. Microsoft Access Forms 2 8th Dec 2009 07:21 PM
Generate a report from unbound text box and parameter query =?Utf-8?B?UmFq?= Microsoft Access Reports 2 15th Mar 2005 04:29 AM
error STOP:0x0000007B (parameter, parameter, parameter, parameter) robert35 Microsoft Access Getting Started 1 15th Dec 2004 04:28 PM
Default Value for unbound text box and unbound form: 1 Microsoft Access Form Coding 0 3rd Sep 2003 02:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:00 AM.