![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
please help
I have a table whith 4 colums, the first is sting the other numbers Code: Sub Button4_Click Form1.Show table1.AddCol(cString,"Item",85) table1.AddCol(cNumber,"Quant.",40) table1.AddCol(cNumber,"P.Unit.",50) table1.AddCol(cNumber,"P.Parc.",50) End Sub Sub btnGravar_Click Nome=tbNome.text ' item Quantidade=tbQuantidade.Text 'Quant. PrecoUnidade=tbPrecoUnidade.Text 'P.Unit. precoParcial=tbQuantidade.Text*tbPrecoUnidade.Text 'P.Parc. table1.AddRow(Nome,Quantidade,PrecoUnidade,precoPa rcial) End Sub it works fine on Run mode in IDE, but dont work compiled to Pc or to PPC error: An error ocurred on sub_btngravar_click Input string was not in correct format |
|
|||
|
hi!!
the space is a copy paste error ![]() correction: Sub Button4_Click Form1.Show table1.AddCol(cString,"Item",85) table1.AddCol(cNumber,"Quant.",40) table1.AddCol(cNumber,"P.Unit.",50) table1.AddCol(cNumber,"P.Parc.",50) End Sub Sub btnGravar_Click Nome=tbNome.text ' item Quantidade=tbQuantidade.Text 'Quant. PrecoUnidade=tbPrecoUnidade.Text 'P.Unit. precoParcial=tbQuantidade.Text*tbPrecoUnidade.Text 'P.Parc. table1.AddRow(Nome,Quantidade,PrecoUnidade,precoPa rcial) End Sub |
|
||||
|
The problem is with "lblTotal.Text". It is blank by default which the optimising compiler cannot convert to a number and so errors. Set the text to "0" and it works.
You didn't show this line in your code snippet "precototal=lblTotal.Text+precoParcial" ![]() |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Addrow like removerow(index) | Vito | Questions & Help Needed | 3 | 02-04-2008 01:09 PM |
| AddCol to Table problem ? | HARRY | Questions & Help Needed | 2 | 01-14-2008 06:44 PM |