A family of Microsoft relational database management systems designed for ease of use.
I can see a backcolor property for the buttons I have on the form.
At any rate, when I posed the question, I didn't realize that access had a toggle command button that can be added to the form with a wizard.
So I ran the wizard to generate the button and added the code below to the on click event of the button.
This is working great!
Now the problem is that an access command button looks different than a toggle button. The toggle button has beveled edges, etc whereas a command button doesn't.
I have all the buttons on the form placed vertically on the left side like a menu. All the buttons look uniform, except the toggle. I'd like all the buttons to look the same, except when the toggle button is in the down position. The code below takes care of the toggling back and forth.
Is there a way to make the toggle button look like a command button so they all look the same unless the toggle is clicked?
Here's the code:
Private Sub Toggle397_Click()
Dim strKeyword As String
If Me.Toggle397 Then
strKeyword = InputBox("Enter Search Terms", "Search in keywords")
If strKeyword <> "" Then
Me.Filter = "SampleNumber & "" "" & State & "" "" & County & "" "" & Date & "" "" & GeographicalName & "" "" & CollectionMethod & "" "" & Collector & "" "" & NPSUnit " & _
"Like ""*" & strKeyword & "*"""
Me.FilterOn = True
Toggle397.Caption = "Turn Off Filter"
End If
Else
Me.Filter = ""
End If
Me.FilterOn = Me.Toggle397
End Sub