
Originally Posted by
angie
I have tried the above code both in the form with the proposal button and the proposal form. The = causes a error. Maybe I am not doing something right.
Sorry I was typing too fast and not thinking.. Gave you bad code
Try the code below. This will get the count of records from a table named "tblProposals". If the count is greater than 0, then it changes the button properties that I listed. You can play around with it. It works.
Code:
Private Sub ChangeButtonColors()
Dim records As Integer
records = Nz(DCount("*", "tblProposals"), 0)
If (records > 0) Then
cmdProposal.ForeColor = vbRed
cmdProposal.FontBold = True
cmdProposal.FontSize = 14
End If
End Sub