Make controls visible/invisible

Lyncroft

QPR for ever
Local time
Today, 23:32
Joined
May 18, 2002
Messages
168
I've a form with 2 buttons. One to add an entry, the other to edit. They both access the same form. This form has buttons on it that I want to be invisible if you're adding and visible if you're editing.

I know I could have 2 separate forms but was wondering how to do this with just one form.
 
If Me.NewRecord Then
Me>SomeCommand.Visible=False
Else
Me>SomeCommand.Visible=True
End If
 
Me.WhateverButton.Visible = IIf(Me.NewRecord, False, True)
 

Users who are viewing this thread

Back
Top Bottom