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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|