button becomes visible when record changes

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have a button that I want to become visible when the a
text box that is named "Status" has the phrase Accounts
Receivable stored in the record that is displayed on the
screen. Right now I have it so that if you change the
status to accounts receivable then the button becomes
visible. But if you are flipping through the records the
button does not become visible and I need it to. This is
the code I have:

Private Sub Form_Current()

If Me.Status = "Account Recievable" Then
Me.ARButton.Visible = True
Else
Me.ARButton.Visible = False
End If

If Me.Status = "AR - In Matching" Then
Me.ARButton.Visible = True
Else
Me.ARButton.Visible = False
End If

End Sub

This particular code is stored in the "On Current" event
which says that it should run every time the focus changes
form one record to another. Any help would be appreciated.
Thanks
 
Private Sub Form_Current()
Select Case Me.Status
Case "Account Recievable","AR - In Matching"
Me.ARButton.Visible = True
Case Else
Me.ARButton.Visible = False
End Select
End Sub
 
Back
Top