473,383 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

CHECKBOX AND RECORDSET("FIELDNAME") <> ""

Hi Everyone,

I have a problem with my classic asp programming. I think I missed something. I encountered logical error an hour ago. And below is one of the lines in my source code wherein I encountered error.

As looking on the code below, I don't know if what was lacking, because it won't satisfy the condition, and it won't go to the next line "SaveRecord".

I am actually generating a checkboxes, dynamically and the checkboxes are based from the CategoryID. if the checkbox is checked then the value is not equal to "". The question is how am I be able to test the value if it will be checked or not?

btw, in relation to this topic, if you'll have another idea about this matter please let me know. thanks in advance.


if Request(CStr(rsCategory("CategoryID"))) <> "" then
SaveRecord
End If
Apr 9 '07 #1
1 1769
jhardman
3,406 Expert 2GB
I like how you made the checkbox name equal to the category ID from your db.. That is a good idea that I never seem to remember when I make my forms.

Try a quick troubleshooting technique: list all the data passed by your form:
Expand|Select|Wrap|Line Numbers
  1. dim x
  2. for each x in request.form
  3.    response.write x & ": " & request.form(x) & vbNewLine & "<br>"
  4. next
Then check to make sure that cstr(rsCategory("categoryID")) returns one of the values of x in the listed form inputs. Does that make sense?

Jared
Apr 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Indrid Colt | last post by:
Thank's for your help ! Indrid
4
by: bijoy | last post by:
I am in the process of upgrading my application db from Access to SQL Server. With the Access backend, I had queries such as "UPDATE table SET fieldName = True". SQL Server doesnt seem to like...
0
by: Bob | last post by:
Just thought I'd share my experience today with this error message. I received it when doing an .update on a recordset .add. The fieldname that the error message included wasn't even in the table...
1
by: Kosmös Pollard | last post by:
Hey guys, I'm rather new to access and can not seem to figure out what is wrong with this code I will post below...but first...it was working perfectly fine before I added this: recSet2.Edit...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.