Hello,
I have a form with 7 unbound text boxes on it. The code below is on an On Click event of a button. The code is supposed to look at all of the unbound text boxes, if they are null make them a 0, and then conduct a simple subtraction calculation. For some reason the Nz(stringhere,"0") function is working on all but two of them. I have looked at some of the textbox properties to see if they are the same( for example all locked = no) and I cannotn find anything. Does anyone have any pointers or places for me to start?
:banghead:I am completely confused why this is working for some textboxes and not the others. :banghead:
Thank you,
Tallman
I have a form with 7 unbound text boxes on it. The code below is on an On Click event of a button. The code is supposed to look at all of the unbound text boxes, if they are null make them a 0, and then conduct a simple subtraction calculation. For some reason the Nz(stringhere,"0") function is working on all but two of them. I have looked at some of the textbox properties to see if they are the same( for example all locked = no) and I cannotn find anything. Does anyone have any pointers or places for me to start?
PHP:
Dim str1 As Variant
Dim str2 As Variant
Dim str3 As Variant
Dim str4 As Variant
Dim str5 As Variant
Dim str6 as Variant
Dim strtotal As Variant
str1 = Nz(txtValue1, "0")
str2 = Nz(txtValue2, "0")
str3 = Nz(txtValue3, "0")
str4 = Nz(txtvalue4, "0")
str5 = Nz(txtvalue5, "0")
str6 = Nz(txtvalue6, "0")
strTotal = (str1 - str2 - str3 - str4 - str5 - str6)
:banghead:I am completely confused why this is working for some textboxes and not the others. :banghead:
Thank you,
Tallman