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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A little Math problem...??

Status
Not open for further replies.

WB786

MIS
Mar 14, 2002
610
On a form I have two text box fields that are populated by a count query. In the Thirs box I want to take the value of Box1 divide it by Box2 to show the result in Box 3. In the control source of my Box3 I have:

=Sum([Group1Count]/[Group2Count])

But I get an #Error for the result in Box3.

Any ideas? Thanks in advance.

:)WB
 
Get rid of the Sum(...) so that it looks like:
=[Group1Count]/[Group2Count]

 
I did that but the field is blank. Do I need to try on current event or something else. Thanks.
 
Ok nevermind your formula works. I was trying it from home and the refresh is not so good when you are connected through a terminal server. I can see the value now. Thanks for your help!!!

:)WB
 
Now this is weird. After closeing the form and going back into it again the totals don't show anymore. So I tried using:

Private Sub Form_Load()
Me.Group1Totals.Value = Me.Group1.Value / Me.Group2.Value
End Sub

That still doesn't show me the totals. What gives?


:)WB
 
hi, wabeg,

if i am reading this right, you are storing the numbers in text fields. you will have to convert them to numbers with
functions such as cdbl before you can do the division. i don't think the "sum" is necessary. TestDrive
 
What other field can I use? I am not familiar with cdbl argument. Can you please provide an example. Thanks.
 
Actually I am using a list box. Hope this helps.
 
If I click on each list box values then the total shows up. How can make it so it automatically clicks on the list boxes?

If anyone has any ideas then please let me know. Thanks.

:)WB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top