Quote:
Originally Posted by OBP After the rst.Movelast add
msgbox rst.recordcount
which will tell you if the Subform has 1 or 2 more records.
You could also use
rst.movenext
to move to the second record. |
rst.recordcount shows 2.
I have made some progress on this, but it is still not working as I want. I now have:
Set rst = Me.RecordsetClone
rst.MoveFirst
Me.btnEntrata.FontBold = Not IsNull(Oggetto)
rst.MoveLast
Me.btnUscita.FontBold = Not IsNull(Oggetto)
Me.Refresh
rst.Close
What happens is that if the 'Oggetto' field in the currently displayed record is blank,
both btnIn and btnOut will display normal text. If, on the other hand, the 'Oggetto' field has something in it,
both buttons will display bold text. I want to be able to display one button with bold text and one with normal text, based on whether the Oggetto
field (not the form control) has text in it or not.
My gut tells me that the problem lies with the 'IsNull(Oggetto)' statement. If I set a breakpoint at the beginning of the routine and check the value of Oggetto while the routine runs, the value does not change after the rst.MoveLast statement runs.