Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invisable/Visable Buttons

Status
Not open for further replies.

Garridon

Programmer
Mar 2, 2000
718
0
0
US
I have a form for data entry that has a delete button. I'd like to make the delete button invisable when the form is open in Add mode and visable when the form is in Edit mode. How do I do that?

Thanks!


Linda Adams
Garridon@aol.com
Linda Adams online David Hedison Online
 
In the forms On Current event:
Me.AnotherObjectThanTheCommandButton.setfocus
If Me.AllowAdditions = True Then
Me.NameOfCommandButton.Visible=False
Else
Me.NameOfCommandButton.Visible= True
End if
If Me.AllowEdits = True Then
Me.NameOfCommandButton.Visible = True
Else
Me.NameOfCommandButton.Visible = False
End if
You can blend these as you see fit and simplify. First line is to make sure your command doesn't have the focus when you flip from record to record.
Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top