G
Guest
Hello,
I have a project form which shows a record for each project. On that form I
have a subform which shows, in continuous form view, all the tasks for each
project. I have a command button which shows up beside each task (ie. if
there are two tasks per project record, then there are two command buttons,
if there are eight tasks, then eight command buttons). This command button,
cmdComments, when clicked on brings up a popup form which has a field from
the subform within it. That field is called TaskJournal and it allows the
user to add or view comments for each task.
The command button, cmdComments, has the letter "i" on it. What I want to
do is have each command button's letter "i" be black if there are no comments
for a task, and be red if there are comments. Is there any way to do this?
Right now I have the code:
Private Sub Form_Current()
If Not IsNull(Me!TaskJournal) Then
Me.cmdComments.ForeColor = vbRed
Else
Me.cmdComments.ForeColor = vbBlack
End If
End Sub
But what this does is if there are comments for one task amongst eight, all
the command buttons' letter "i"s show up red and if there are no comments for
a record (when on that record) they all show up black. I need each command
button to show red or black for its corresponding task at all times. I hope
someone can help with this.
Thanks,
Janet
I have a project form which shows a record for each project. On that form I
have a subform which shows, in continuous form view, all the tasks for each
project. I have a command button which shows up beside each task (ie. if
there are two tasks per project record, then there are two command buttons,
if there are eight tasks, then eight command buttons). This command button,
cmdComments, when clicked on brings up a popup form which has a field from
the subform within it. That field is called TaskJournal and it allows the
user to add or view comments for each task.
The command button, cmdComments, has the letter "i" on it. What I want to
do is have each command button's letter "i" be black if there are no comments
for a task, and be red if there are comments. Is there any way to do this?
Right now I have the code:
Private Sub Form_Current()
If Not IsNull(Me!TaskJournal) Then
Me.cmdComments.ForeColor = vbRed
Else
Me.cmdComments.ForeColor = vbBlack
End If
End Sub
But what this does is if there are comments for one task amongst eight, all
the command buttons' letter "i"s show up red and if there are no comments for
a record (when on that record) they all show up black. I need each command
button to show red or black for its corresponding task at all times. I hope
someone can help with this.
Thanks,
Janet