I am currently using this form... which has a whole bunch of code behind the scene.
Dim ItemNum(1 To 5) As String
Dim ItemQty(1 To 5) As Integer
Dim ItemDesc(1 To 5) As String
Dim i As Integer
ItemNum(1) = txtItem1Num.Value
ItemNum(2) = txtItem2Num.Value
ItemNum(3) = txtItem3Num.Value
ItemNum(4) = txtItem4Num.Value
ItemNum(5) = txtItem4Num.Value
ItemQty(1) = Val(txtItem1Qty.Value)
ItemQty(2) = Val(txtItem2Qty.Value)
ItemQty(3) = Val(txtItem3Qty.Value)
ItemQty(4) = Val(txtItem4Qty.Value)
ItemQty(5) = Val(txtItem5Qty.Value)
ItemDesc(1) = txtItem1Desc.Value
ItemDesc(2) = txtItem2Desc.Value
ItemDesc(3) = txtItem3Desc.Value
ItemDesc(4) = txtItem4Desc.Value
ItemDesc(5) = txtItem5Desc.Value
For i = 1 To 5
If ItemQty(i) <> 0 Then ' if the qty is not a blank value then add the item
strText = strText & "Item " & i & " - " & ItemNum(i) & " | " & ItemQty(i) & " | " & ItemDesc(i)
strText = strText & "<br>"
'if it was blank it will be skipped and the loop will move onto the next item (i will run from 1 to 10)
There is even more code, including other variables - where is where I think my problem lies.
When I run my form/code everything is fine the first time around. But when I run it second time, all the information filled in the first time is still there.
How do I set it up so that my form is new everytime I open it?