Displaying Labels On Form based on Form Mode (1 Viewer)

syoung7903

Registered User.
Local time
Today, 15:41
Joined
Jan 1, 2001
Messages
18
I am using Switchboard Manager to open up a form once in add mode and also in edit mode. I want to display one label if the mode is Add and a different label if the mode is Edit. Otherwise the user gets confused as to whether or not they are in Add or Edit mode. Any ideas?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:41
Joined
Feb 19, 2002
Messages
43,609
You can add a field to the form that displays one of two values.

In the current event:

If Me.NewRecord Then
Me.DispStatus = "new record"
Else
Me.DispStatus = "existing record"
End If
 

syoung7903

Registered User.
Local time
Today, 15:41
Joined
Jan 1, 2001
Messages
18
That definetly has put me going in the right direction. I added the following code to the "On Load" Event of the form. But now matter how the form is loaded Label93 is visible and label75 is not visible. What am I doing wrong? Thanks so much for your help.

If Forms!Master.NewRecord = True Then
Forms!Master.Controls!Label75.Visible = False And Forms!Master.Controls!Label93.Visible = True
ElseIf Forms!Master.NewRecord = False Then
Forms!Master.Controls!Label75.Visible = True And Forms!Master.Controls!Label93.Visible = False
End If
 

Users who are viewing this thread

Top Bottom