>>where can I find some information about the STR() fucntion... and how to use it.. maybe some examples... TY :)
>
>I would start from looking in the Help.
>
>=messagebox(str(5.67))
>
>Where i am having the problem is adding to the database the numeric value in the combobox, ive tried so many times to append it to my table and it gives me data type mismatchs... I related the table in the main code too.. so i dont understand
>
>
>This is my code:
>************************************************************************************
>select maintable
> Append blank
> replace maintable.id_customer with thisform.combo1.value *error here
> replace maintable.comment with thisform.text1.value
> replace maintable.purchase_number with thisform.text2.value
> replace maintable.customer_addres with thisform.edit1.value
> =tableupdate(.t.)
>************************************************************************************
>
>
>I would prefer being able to add a numeric field from the combo box to the table in the data base....
>
>
>... I could make them character fields... but i dont want to, because as character I cant use the id customer to sum one everytime the user wants to add a new customer loading the form for adding customers. That way the user doesnt have to add the id number himself. do you understand what im trying to explain... and I tried the STR() function but i still dont know how to use it.
This would work
select maintable
Append blank
replace id_customer with val(thisform.combo1.value), ;
comment with thisform.text1.value, ;
purchase_number with thisform.text2.value, ;
customer_addres with thisform.edit1.value in MainTable
if not tableupdate(.t.)
=aerror(laError)
=messagebox(laError[2])
endif
If it's not broken, fix it until it is.
My Blog