Hi all,
This is what I want to do. I have some text fields and command buttons that I would like to toggle enable/disable based on a a field in the current record. As the user flips through the records, I would like the fields to be either disabled or enabled based on a property of that selected record. Many sources online suggest using the "On Current" event.
When I implemented this idea I am getting a weird result. I have figured out that the on-current event is evaluating the property of the record being switched FROM, not the record being switched TO. I do not know if there is something wrong with my code or with the idea of using the on-current event for this. Here is my code under the on-current event:
If Me.Status = "Together" Then
Me.JoinD.Enabled = False
Me.JoinMal.Enabled = False
Me.JoinTo.Enabled = False
Me.SepOn.Enabled = True
Me.SepD.Enabled = True
Else
Me.SepOn.Enabled = False
Me.SepD.Enabled = False
Me.JoinD.Enabled = True
Me.JoinMal.Enabled = True
Me.JoinTo.Enabled = True
End If
Thanks for any help.
This is what I want to do. I have some text fields and command buttons that I would like to toggle enable/disable based on a a field in the current record. As the user flips through the records, I would like the fields to be either disabled or enabled based on a property of that selected record. Many sources online suggest using the "On Current" event.
When I implemented this idea I am getting a weird result. I have figured out that the on-current event is evaluating the property of the record being switched FROM, not the record being switched TO. I do not know if there is something wrong with my code or with the idea of using the on-current event for this. Here is my code under the on-current event:
If Me.Status = "Together" Then
Me.JoinD.Enabled = False
Me.JoinMal.Enabled = False
Me.JoinTo.Enabled = False
Me.SepOn.Enabled = True
Me.SepD.Enabled = True
Else
Me.SepOn.Enabled = False
Me.SepD.Enabled = False
Me.JoinD.Enabled = True
Me.JoinMal.Enabled = True
Me.JoinTo.Enabled = True
End If
Thanks for any help.