View Single Post
  #9 (permalink)  
Old 01-29-10, 16:47
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,042
Quote:
Originally Posted by Pat Phelan View Post
Code:
If optRateA.Value = True Then
  intGross = intHours * optRateA
Else
  If optRateB.Value = True Then
    intGross = intHours * optRateB
  Else: optRateC.Value = True
    intGross = intHours * optRateC
  End If
Does this help? Code formatting can be a wonderful thing!

-PatP
Indeed.


In visual studio, hold down Ctrl, then press "K", then WITHOUT LETTING GO OF CTRL, press "D".

Tends to cut down on time needed to hunt down issues with control structure formatting...


Also, look in to using a RadioButtonList. You could condense that to a single line by hitting up the SelectedValue/SelectedIndex properties:

intGross = intHours * yourRadioButtonList.SelectedValue
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***

Last edited by Teddy; 01-29-10 at 16:54.
Reply With Quote