Two toggle buttons with two different Captions on same form

johnhobbis

Registered User.
Local time
Today, 15:38
Joined
Apr 5, 2001
Messages
22
I have a present a Toggle button that changes from AT RISK to NOT AT RISK using the following VB
===========================
Private Sub Form_Current()
If Me.At_Risk_Register.Value = True Then
Me.At_Risk_Register.Caption = "AT RISK"
Else
Me.At_Risk_Register.Caption = "NOT AT RISK"
End If
End Sub
====================================
Private Sub At_Risk_Register_BeforeUpdate(Cancel As Integer)
If Me.At_Risk_Register.Value = True Then
Me.At_Risk_Register.Caption = "AT RISK"
Else
Me.At_Risk_Register.Caption = "NOT AT RISK"
End If
End Sub
===============================
The Problem --- I have to have another Toggle button with a different captions but cannot use the Form_current again.

It must appear on the same form

2nd button name = Discharge_button, captions "Discharge", "Click to Discharge"

Can anyone help Please??
 
Why can't you use the form's current event and why do you use the same code twice? In the after update of At_Risk_Register just put Form_Current.
HTH
 

Users who are viewing this thread

Back
Top Bottom