Bill Church
|
| Posted: 04/18/2002, 2:06 PM |
|
Okay, this one's got me stumped. I browsed the articles and threads here and haven't found out how to get rid of it.
I have a grid form, if it doesn't return any rows I don't want the titles displayed along with the NoRecords html. I'm using ASP 2.0 with HTML Templates.
The grid name is SiteJobs
I assume I need to do something like:
if SiteJobsNoRecords = True then
SetVar "FormSiteJobs",""
Exit Sub
end if
But if I set the above to True or False it either hides the form all the time or displays it all the time regardless of records returned. HELP!
|
|
|
 |
Nicole
|
| Posted: 04/19/2002, 1:53 AM |
|
Bill,
to find whether the recordset is empty you should build full sql statement and execute it. While no records are returned, hide the form. E.g.:
sSQLcheck = sSQL & sWhere & sOrder
openrs rscheck, sSQLcheck
if rscheck.eof then
SetVar "FormFormName", ""
exit sub
end if
|
|
|
 |
Bill Church
|
| Posted: 04/19/2002, 5:29 AM |
|
You're up pretty late or really early! :)
That did it. Boy if feel like a goob, I was about 2 feet away from trying that. I guess I was just looking at it too hard.
Thanks for the help.
-Bill
|
|
|
 |
|