|
| |
|
|
cswolf
Posts: 42 Joined: 11/9/2005 Status: offline
|
how to check if a field has a value in a recordset? - 4/24/2008 12:46:40
Hi all, I've got some code here on a web page that I did not write that connects to an MS Access DB, searches it, and then displays the results for you. It is an internal phone directory. A question has come up where we would like for any entry in the DB that does not have a value for the "Title" field to not be displayed in the results. I was thinking some sort of filter would be able to do this, but I am not exactly sure how. How can I check if there is a value for something in a recordset, then if there is a value have it display the information, and if not just move on to the next record? I am using classic ASP by the way. I was thinking it would be something like this: <% check if "Title" field has value in recordset. If it does, Then Display information here (I have this code already) Else Go to next record End If %> How would I do that? Thanks!
|
|
|
|
rdouglass
Posts: 9137 From: Biddeford, ME USA Status: offline
|
RE: how to check if a field has a value in a recordset? - 4/24/2008 13:23:03
quote:
check if "Title" field has value in recordset. If it does, Then If trim(rs("Title") & "") > "" Then That should be close.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|