Need Help. - Can't find my error

B

Bob Barrows [MVP]

Gaby said:
I tried what you said and it worked. The only thing I need to add if
making it ok to leave data out. I would get a error if I left
checkboxes unchecked. During the actual survey, it will be ok for
students to leave boxes blank if they do not apply. Is there anyway
to code it so that incomplete data is allowed?
You need to check for the existence of the checkbox variables and pass
true if they exist and false if they don't. Generically:

checkboxvalue = false
if len(request.form("checkbox")) > 0 then
checkboxvalue=true
else
checkboxvalue = false
end if


This can be done in the data validation step I described in my previous
post.
 
E

Evertjan.

Bob Barrows [MVP] wrote on 31 jul 2006 in
microsoft.public.inetserver.asp.general:
Generically:

checkboxvalue = false
if len(request.form("checkbox")) > 0 then
checkboxvalue=true
else
checkboxvalue = false
end if

Twice "checkboxvalue = false" is a bit overdone, Bob.

In one row, try:

checkboxvalue = len(request.form("checkbox")) > 0
 
B

Bob Barrows [MVP]

Evertjan. said:
Bob Barrows [MVP] wrote on 31 jul 2006 in
microsoft.public.inetserver.asp.general:


Twice "checkboxvalue = false" is a bit overdone, Bob.

In one row, try:

checkboxvalue = len(request.form("checkbox")) > 0
Oops, my cut-and-paste became a copy-and-paste somehow.
Normally I would do what you suggested, but i wanted to make it clear
for Gaby.
 
G

Gaby

I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.
 
B

Bob Barrows [MVP]

Gaby said:
I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.
What is line 15?
 
E

Evertjan.

Gaby wrote on 02 aug 2006 in microsoft.public.inetserver.asp.general:
I went ahead and fille din the rest of the 130 quesions. It worked
fine with 5 questions but now I get
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 5]'

/web/test/hbrown/Insert.asp, line 15

i thought maybe it would have to do with the 'ar()' part. Right now I
have it set to ar(138).

I dont know what else I can do to fix this.

What are you talking about?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

<http://www.safalra.com/special/googlegroupsreply/>
 
G

Gaby

Bob said:
What is line 15?

This is all it is.
ar(6)= Request.Form("6_AbleToDoubtOthers")

If you want the whole code its a little long. If you think it will
help I can get it to you. Shoot me an email and ill send you a text
file.
 
G

Gaby

Ok, so I got this thing working but now Im having more questions.
Sorry if this topic is geting old but here i go....

i have it where the suvey questions get submitted into the access
table. the code i used is like the one above only with 135 questions.
but now theres a second survey i need to add. once they complete the
first, i want it to go to the second. since there will be two submit
button , how to i get it to edit the existing record and not add a new
one. the students have to enter their roster number on both surveys as
this is there primary key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top