That looks as if the TxtBox.Value is of a type that is not numeric, probably character.
You can check the type of a TxtBox.Value with the type() or vartype() functions.
You can force the type to be numeric by explicitly initializing it, either in the Property Sheet (assign the value 0 to the .Value property), or in some Init() (in the TextBox itself, or in the Form).
HTH,
Hilmar.
>I need to do some calculations for the screen only. I have put a text box on the screen and add or substract values fine. Once I try divide I get a data type mismatch error.
>
>thisform.total.value = thisform.txtbox1.value + thisform.txtbox2.value works fine.
>thisform.total.value = thisform.txtbox1.value / thisform.txtbox2.value gets data type mismatch error.
>
>I have even tried using variables to do the math then display in the text box, still no luck.
>
>My data is in an array, do I have to add the value from there then display in my text box....
>
>Thanks.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)