Chey,
You won't be doing that with a Click or DblClick.
Changing the color of a field with a Click would change the color of that field for all
records during that session. When the form is reopened later, that field revert to the
color designated in Design mode. Also, during a session, that field will have the same
color on all records.
We need a field that will store the "status" of that text control, so we can
"logically" color the field accordingly... on the fly for each record.
Add a field to your table called Reconciled, make it a Yes/No (format = True/False)
field. This will be a checkbox on the form. (ex. name chkReconciled)
When a record has been reconciled, click the Reconciled checkbox. That in itself
should be enough for the user to see that this record has been reconciled. but if you
still need to change the color of a field accordingly, use this code on the AfterUpdate
event of chkReconciled...
(use your own control names)
Private Sub chkReconciled_AfterUpdate()
If chkReconciled = True Then
YourFieldName.Forecolor = QBColor(12) 'Light Red
Else
YourFieldNAme.Forecolor = QBColor(0) 'Black
End If
End Sub
Also, we'll have to decide on the appropriate color each time we come to a record
(browse).
Place the same code as above in the Current event of the form itself.
When you check Reconciled, the color will change to Red, when you uncheck Reconciled it
will return to Black (toggling)
Access can not "remember" if a text control has been clicked or not, so that Reconciled
"status"