Can I hide blank records? |
1/28/2007 6:34:49 PM |
ASPRunnerPro General questions | |
G
grinningdog author
I've got a form with the fields 'name', 'phone number', and 'comments' visible. How can I show only the records with an entry in the 'comments' field? |
|
J
|
Jane 1/29/2007 |
Bob, select field1, field2, field3 from TableName where (comments is NULL or comments='') |
G
|
grinningdog author 1/29/2007 |
No, I'm sorry but I just don't get it. I'm going to the Edit SQL tab and selecting the relevant table. |
J
|
Jane 1/29/2007 |
Bob, |
G
|
grinningdog author 1/29/2007 |
Aha, now I get it and I can adapt this to other places too. |
J
|
Jane 1/29/2007 |
Bob, Function BeforeEdit(dict, where) dict("Category") = dict("Age") & " " & dict("Gender") BeforeEdit = True End Function |
G
|
grinningdog author 1/29/2007 |
OK, I really want to try and work this out myself but as long as I'm on the right track with a Before Edit event I'll keep at it. |
G
|
grinningdog author 1/29/2007 |
I'm obviously too dim-witted! I'm just off on a short holiday so maybe a bit of sunshine will agitate my brain cells. I'll try again in a week |
J
|
Jane 1/30/2007 |
Hi, Function BeforeEdit(dict, where) if dict("Gender")="Male" and dict("Age")>=15 and dict("Age")<=19 then dict("Category") = "JM" end if if dict("Gender")="Female" and dict("Age")>=15 and dict("Age")<=19 then dict("Category") = "JF" end if if dict("Gender")="Male" and dict("Age")>=20 and dict("Age")<=39 then dict("Category") = "SM" end if BeforeEdit = True End Function |
G
|
grinningdog author 2/14/2007 |
Doh! I was SO close :¬) |