A
alomrani
Hi all ,
I'd appreciate anyone insight on this
I have created a form that fetched rows from a query. On each row I
have added buttons to execute command for that relevant row only. The
Form displays all rows fetched in tabular format.
Now one of the data fetched is a Yes/No Value , When it is true it
should hide some of the buttons and make some visible.
I have written that routine but I dont know on which event shall i
place it at. When I put it at (form on load) it says object undefined.
?! any clue
Private Sub is_approvedBox_(### What Event ###)(Cancel As Integer)
If (is_approvedBox.Value = -1) Then
QualifyLeaveCmd.Visible = False
DeleteLeaveCmd.Visible = False
PrintReport.Visible = False
EditLeaveCmd.Visible = True
Else
PrintReport.Visible = True
QualifyLeaveCmd.Visible = True
DeleteLeaveCmd.Visible = True
EditLeaveCmd.Visible = False
End If
End Sub
Will I also need to pass a variable to the button when i click it
stating which row it belongs to ?
I'm confused.
Thanks Again
Regards
Alya
I'd appreciate anyone insight on this
I have created a form that fetched rows from a query. On each row I
have added buttons to execute command for that relevant row only. The
Form displays all rows fetched in tabular format.
Now one of the data fetched is a Yes/No Value , When it is true it
should hide some of the buttons and make some visible.
I have written that routine but I dont know on which event shall i
place it at. When I put it at (form on load) it says object undefined.
?! any clue
Private Sub is_approvedBox_(### What Event ###)(Cancel As Integer)
If (is_approvedBox.Value = -1) Then
QualifyLeaveCmd.Visible = False
DeleteLeaveCmd.Visible = False
PrintReport.Visible = False
EditLeaveCmd.Visible = True
Else
PrintReport.Visible = True
QualifyLeaveCmd.Visible = True
DeleteLeaveCmd.Visible = True
EditLeaveCmd.Visible = False
End If
End Sub
Will I also need to pass a variable to the button when i click it
stating which row it belongs to ?
I'm confused.
Thanks Again
Regards
Alya