Wizmeister's Profile
Reputation: 0
Apprentice
- Group:
- Members
- Active Posts:
- 19 (0.08 per day)
- Joined:
- 17-October 12
- Profile Views:
- 959
- Last Active:
Jan 09 2013 05:02 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: If, Then, Else statement is Database.
Posted 8 Jan 2013
I can't think of a way, I checked the problem and the WHERE statement has to be used for 80 and 90 id's -
In Topic: If, Then, Else statement is Database.
Posted 8 Jan 2013
I have learned it -
In Topic: Just pulling data and displaying it in labels. OptionStrict
Posted 25 Nov 2012
SOLVED. For anyone using this as an archive, in the program to pull the data, the loop must be at 1 not 0. and secondly, after you close the loop, you need a loop counter.
looks like CharlieMay & Lar3y taught me some nice stuff!
-
In Topic: Display error.
Posted 31 Oct 2012
The lines where I added the comment appears yellow when I click the Calc button. the "decLABOR_CHARGE" I newly declared at the top. It has a decimal value of 20. Replacing the dblPart line with your statement still gives out the same error when it comes time to calculate.
Both lines read the same error when they are tested.
" Conversion from string "" to type 'Decimal' is not valid. "Function PartsTotal() As Decimal ' Function for the Parts total without tax. Dim decPartsTotal As Decimal If chkMuffler.Checked = True Then If CBool(CDec(CDbl(txtPart.Text) >= 0)) Then decPartsTotal = (CDec(CDbl(txtPart.Text) * decMUFFLER)) Else MessageBox.Show("Parts cannot be less than 0.") End If End If Return decPartsTotal End Function Function LaborFee() As Decimal ' function for the labor hourly charge. Dim decLABOR_FEE As Decimal If CBool(CDec(CDbl(txtLabor.Text) >= 0)) Then decLABOR_FEE = (CDec(CDbl(txtLabor.Text) * decLABOR_CHARGE)) Else MessageBox.Show("Please enter a valid number for labor fee.") End If Return decLABOR_FEE End Function
I don't know how but this worked.
and wait, that was a no go. -
In Topic: Display error.
Posted 31 Oct 2012
OKAY! Now I am getting conversion errors for both functions Labor and Parts.
Labor:
Function LaborFee() As Decimal ' function for the labor hourly charge. Dim decLABOR_FEE As Decimal If CDbl(txtLabor.Text) >= 0 Then decLABOR_FEE = (CDec(txtLabor.Text) * decLABOR_CHARGE) ' conversion error. option strict on. Else MessageBox.Show("Please enter a valid number for labor fee.") End If Return decLABOR_FEE End Function
Parts:
Function PartsTotal() As Decimal ' Function for the Parts total without tax. Dim decPartsTotal As Decimal If chkMuffler.Checked = True Then If dblPart >= 0 Then decPartsTotal = (CDec(txtPart.Text) * decMUFFLER) ' conversion error. option strict has to be on! Else MessageBox.Show("Parts cannot be less than 0.") End If End If Return decPartsTotal End Function
Option strict is a must for this assignment. I cannot figure out any other way to do this without crashing the whole project, any value input in the text boxes ( named txtLabor and txtPart ) simply cause a crash. even valid numbers. the same error for both " Cannot convert to decimal from string"
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Click here to e-mail me
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
Darkkiller012
19 Oct 2012 - 08:13