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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query result in text box



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2009, 04:24 PM posted to microsoft.public.access.queries
Jeannine
external usenet poster
 
Posts: 10
Default query result in text box

Hi,

I am creating a database that is designed to perform calculations on data
that is input daily. I have made a form on which to input the data and there
are two text boxes that perform the queries and show the results, however the
text boxes show results before the data is completely typed in. The results
won't show correctly until I close and reopen the form. What can I do to have
the query initiate after the data is input or to have it refresh?

Thank you,


  #2  
Old November 9th, 2009, 08:24 PM posted to microsoft.public.access.queries
Dale Fye
external usenet poster
 
Posts: 2,651
Default query result in text box


Jeannine,

In that situation, I would generally make the textboxes where you want to
see the results as unbound, and would not set their control sources to
anything.

Then, I would add a command button (cmdResults) to your form, that sets the
values of those controls (runs the queries and puts the results into the
"value" property of the textbox.

I would also setup the other controls on your form so that when the values
in any of those fields are changed (use the change event), it clears out the
value of your results textboxes. This way, as soon as you make a change in
any of the other controls, the "results" will disappear until you click the
"cmdResults" button.

----
HTH
Dale



"Jeannine" wrote:

Hi,

I am creating a database that is designed to perform calculations on data
that is input daily. I have made a form on which to input the data and there
are two text boxes that perform the queries and show the results, however the
text boxes show results before the data is completely typed in. The results
won't show correctly until I close and reopen the form. What can I do to have
the query initiate after the data is input or to have it refresh?

Thank you,


  #3  
Old November 9th, 2009, 08:25 PM posted to microsoft.public.access.queries
Dale Fye
external usenet poster
 
Posts: 2,651
Default query result in text box

As an alternative to my previous post, you could also use the AfterUpdate
event of the various controls to requery the results textboxes.

----
HTH
Dale



"Jeannine" wrote:

Hi,

I am creating a database that is designed to perform calculations on data
that is input daily. I have made a form on which to input the data and there
are two text boxes that perform the queries and show the results, however the
text boxes show results before the data is completely typed in. The results
won't show correctly until I close and reopen the form. What can I do to have
the query initiate after the data is input or to have it refresh?

Thank you,


 




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:49 PM.


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