Multiplication problem: Please Help
I would like to multiply the value inserted in the textbox with 25. Below is my coding. There is no error but there is no result also.:( Please HeLP
sql = " update userFabrication set userProcess = '" & cboProcess.Text & "', userHours = '" & txtHours1.Text & "' where dieHistoryId = '" & Id & "'"
rs2.Open sql, conn
If cboProcess.Text = " Designing " Then
sql = " select 25* '" & txtHours1.Text & "' as Cost
rs2.Open sql,conn
txtProcessCost1.Text = rs2("cost")
Thank you.
[554 byte] By [
galgal5814] at [2007-11-11 7:46:20]

# 1 Re: Multiplication problem: Please Help
You do not need a SQL select statement or recordset to access the value in a textbox like this:
If cboProcess.Text = " Designing " Then
sql = " select 25* '" & txtHours1.Text & "' as Cost
rs2.Open sql,conn
txtProcessCost1.Text = rs2("cost")
Just do something like this:
txtProcessCost1.Text = Val(txtHours1.Text) * 25
# 2 Re: Multiplication problem: Please Help
Thank you...
txtProcessCost1.Text = Val(txtHours1.Text) * 25-> this code works but when I combine it with "If cboProcess.Text = " Designing " Then" it doesn't seem to work anymore.Can someone help me with this problem please?
Thank you
# 3 Re: Multiplication problem: Please Help
Thank you...
txtProcessCost1.Text = Val(txtHours1.Text) * 25-> this code works but when I combine it with "If cboProcess.Text = " Designing " Then" it doesn't seem to work anymore.Can someone help me with this problem please?
Thank you
Well what does the debugger tell you?
is cboProcess.Text = " Desinging ", or
is cboProcess.Text = "Desinging"
just a thought
Eddie