Advertisement

04.05.2008 at 09:02PM PDT, ID: 23299108
[x]
Attachment Details

Calculation causes Overflow

Asked by dlogan7 in Access Forms

Tags: Microsoft, Access, 2003

I am trying to perform a calculation in the middle of some text that will all be used to populate a text box on a form. Here's what I am doing. the overflow occurs on the line that starts with int45. It may be obvious to anyone that reads this code, but this is the first time I have tried something like this.

Dim int41 As Integer
Dim int42 As Integer
Dim int45 As Double

int41 = DCount("*", "SelectedVarietyWinners-Trait")
int42 = DCount("*", "SelectedVarietyHeadToHeads-Trait")
int45 = int41 / int42

Me.Text48.Value = "* There were " & [int42] & " varieties having the same trait as " & [SelectedVariety] & ". Of those varieties, " & [SelectedVariety] & " had a higher average yield in head to head tests than " & [int41] & " varieties...or " & FormatPercent([int41] / [int42], 0) & " of the varieties."
Start Free Trial
[+][-]04.05.2008 at 10:31PM PDT, ID: 21290861

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Forms
Tags: Microsoft, Access, 2003
Sign Up Now!
Solution Provided By: sam_coer
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.06.2008 at 02:07AM PDT, ID: 21291199

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.06.2008 at 10:18AM PDT, ID: 21292427

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 02:02PM PDT, ID: 21293137

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 02:06PM PDT, ID: 21293157

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 03:34PM PDT, ID: 21293417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 05:48PM PDT, ID: 21293754

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 06:31PM PDT, ID: 21293847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_Related_20080208