To flag a form if incomplete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Any suggestions to the above subject????
I have a number of records and each record has it's own form. I would like
to create a field in that form that changes its colour if a particular field(
LET'S CALL IT" A") is left incomplete, so that the data entry person knows
that the field "A" is left blank.
I generated the following Macro,

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
End If
End Sub

This Macro works, but the problem is that when I am scrolling the forms,
and if I come across one record that has the field "A" blank the colour comes
up red and then all the remaining records will come up red even though the
field "A" is complete.
I think my problem lies inthe fact that I created the Macro in Form_ Current
what can I do to rectify this???????

Thanks.
 
Change your code to:

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
Else
Me![Form Status].BackColor = vbWhite
End If
End Sub
 
Thanks a lot Nikos!!!!! It worked!!!

Nikos Yannacopoulos said:
Change your code to:

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
Else
Me![Form Status].BackColor = vbWhite
End If
End Sub
Any suggestions to the above subject????
I have a number of records and each record has it's own form. I would like
to create a field in that form that changes its colour if a particular field(
LET'S CALL IT" A") is left incomplete, so that the data entry person knows
that the field "A" is left blank.
I generated the following Macro,

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
End If
End Sub

This Macro works, but the problem is that when I am scrolling the forms,
and if I come across one record that has the field "A" blank the colour comes
up red and then all the remaining records will come up red even though the
field "A" is complete.
I think my problem lies inthe fact that I created the Macro in Form_ Current
what can I do to rectify this???????

Thanks.
 
Welcome!
Thanks a lot Nikos!!!!! It worked!!!

:

Change your code to:

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
Else
Me![Form Status].BackColor = vbWhite
End If
End Sub
Any suggestions to the above subject????
I have a number of records and each record has it's own form. I would like
to create a field in that form that changes its colour if a particular field(
LET'S CALL IT" A") is left incomplete, so that the data entry person knows
that the field "A" is left blank.
I generated the following Macro,

Private Sub Form_Current()
If IsNull(Me![Night Tech Reviewed]) Then
Me![Form Status].BackColor = vbRed
End If
End Sub

This Macro works, but the problem is that when I am scrolling the forms,
and if I come across one record that has the field "A" blank the colour comes
up red and then all the remaining records will come up red even though the
field "A" is complete.
I think my problem lies inthe fact that I created the Macro in Form_ Current
what can I do to rectify this???????

Thanks.
 
Back
Top