Continuing problem

potts

Registered User.
Local time
Today, 10:42
Joined
Jul 24, 2002
Messages
87
I recently posted a question concerning calculating ratios on a form, and was sent some code to try out. Unfortunately, I cannot get it to work. I don't think it is a problem with the code itself, rather where and how I am attaching it to the form. I'm sorry not to be giving more clarification than this, but I really am now lost and have hit the late night test screen in my head. If anyone has any suggestions, I'd be only too glad to try things out.

Thanks
 
Specific...

There are tons for posts here. So, you have to be very specific or at least give the link to your original post.

I myself used lots of ratio, percentage, sum or some kinda mathmetics. and It works. You can also save a calculation to your record.

So, i don't know what you are wanting to do. Please re-post and someone will help you.

Best way to this is to put some kinda sample database and zip it and uploaed with your concern. I found it very helpful.

Good Luck

Dianna
 
Sorry.

The original post was titled "auto update ratio calculation".

The gist of it is that I have 3 bound controls on a form: variable1, variable2 and the ratio of the two of them. What I want to do is be able to insert values into two of the three variables and have the third one calculate automatically. It is important to not that I may not always be entering the same two variables - it could be any of the three.

I felt that the best way to do this would be to create a public function and attach it to the appropriate form, particularly as I may want to use it again elsewhere. However, being quite rusty and not very good at this stuff to begin with, it didn't take much to have me completely stumped. What I need is both help with the code and where to place it (both location and to which event) as I can't really tell where I'm going wrong.

Any help is very much appreciated

Thank-you
 
I don't think you want the 'ratio' control to be bound, if you are just using it on your form to calculate one of the other two.

In the AfterUpdate event of the form, you can add some code to calculate the third (i.e null value). I would have the routine check to see if exactly two of your fields are non-null and then performs your math if so.

You should include an error routine to deal with the case of a user putting a '0' value in the denominator field of your ratio.
 

Users who are viewing this thread

Back
Top Bottom