This topic is locked

Disable Button

3/12/2009 11:02:30 AM
ASPRunnerPro General questions
C
Carrie author

Hi there. I have a piece of code that "Disables" a button if child records exist for the parent. This works fine, but what I need to be able to do is this (probably not possible):
If a parent record has children, I need to be able to "Disable/Gray Out" the check box for that individual record. So something like this:
Rec1 Name Date Orders
1 Tom 12/12/08 0 (here the check box is enabled so one can delete etc)

2 Tim 01/07/09 2 (here the check box needs to be DISABLED so delete cannot be performed)

3 Jerry 01/08/09 0 (here the check box is enabled so one can delete etc)
And so on.
I realize that I have to use custom code (which I have), but I'm not sure how to do this. The field/column I would be checking is a numeric value for that record.
I am using this code:

if Cint(strValue) > 0 then

record("checkbox")=false

end if

This works (kinda), the problem is is that the CHECKBOX is only dispayed when there are 0 Total_Orders and not displayed at all when there 1 or more children. I want it displayed, just disabled - not totally removed.
If I need to, I can live with this, but in a perfect world...
Thanks all.
Carrie.

C
Carrie author 3/12/2009

[RESOLVED]
All is OK everyone, I figured it out.
Cheers,
Carrie.