L'apprentis
Redcifer
- Local time
- Yesterday, 23:27
- Joined
- Jun 22, 2005
- Messages
- 177
I have created an unbound "search form" with a subform bound to a query. The default view of the subform is set to continuous which, allow me to see each record of the query in a single row (all field are tagged "Row").
One of the the Query field "Boolean" as a Yes/No format.
I have written a code that would highlight only the record row with the field boolean="true".
When the form is loaded all the field are highlighted even when "Boolean"=False, I don't understand why? Is anybody has any idea on what to do to make the code work?
Here is the code:
One of the the Query field "Boolean" as a Yes/No format.
I have written a code that would highlight only the record row with the field boolean="true".
When the form is loaded all the field are highlighted even when "Boolean"=False, I don't understand why? Is anybody has any idea on what to do to make the code work?
Here is the code:
Code:
Private Sub Form_Current()
Dim ctl As Control
If Me.Boolean = "-1" Then
For Each ctl In Controls
If ctl.Properties("Tag") = "Row" Then ctl.Properties("FontBold") = True
Next ctl
Else
For Each ctl In Controls
If ctl.Properties("Tag") = "Row" Then ctl.Properties("FontBold") = False
Next ctl
End If
End Sub
Last edited: