Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO - Calculated field from 2 databound fields

Status
Not open for further replies.

kmcclung

Programmer
Nov 20, 2001
120
0
0
US
I am trying to populate a label (unbound) with the result of one label divided by another (both ado bound). My form has 8 tabs and generally this field is calculated when the user clicks on the tab which the calculated field is display on. The problem is if the user stays on that tab and moves through the recordset, the calculated field is not recalculated on each new record - it stays the same as the first record until the user clicks on a different tab and that back to that one again.

Any suggestions?
 

Put the calculation in a function proceedure and call it from the Validate event of those textboxes which are used for the values in the calculation it self.



[/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
They are labels, not text boxes, so there is no validation event. I had to use labels because I actually reached the maximum number of controls on a form. Therefore I had to create arrays for the labels so I could fit everything on one form.
 
Then check out the ADO MoveComplete event. [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 

Or the Change event of the label... [/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top