Hi all, sorry for posting so many questions.

Here it is.

I have a For loop that makes textboxes in a form based on user input. If user inputs Num = 5, 5 textboxes will come out and their NAMEs are txtGuest_1, txtGuest_2, etc. This works fine. This is being done in the server-side script.

Now, I want user to put numbers into those textboxes, and add the total value of them all by pressing a button (cmdGo).

In the client-side script:

-------------
Sub cmdGo_OnClick

Dim Tot
Tot = 0

For counter = 1 to Num
Tot = Tot + Document.frmBoxes.txtGuest_counter.Value
Next

Msgbox Tot
---------------

This code does NOT work. It says Object doesn't support this property or method Document.frmBoxes.txtGuest_counter.

So how can I do this? I need to call each boxes by their names, and the names depend on the user input.

By the way, there is no other problem in my files. If I simply replace the For Loop with
MsgBox Document.frmBoxes.txtGuest_1.Value for example, it will show whatever number I put in textbox 1.

THANK YOU SO MUCH!!! Please help...

Martin