Make Command button Visible/Not Visible

A

Alex Martinez

Hi,

I have a form that has a tab control in it. The first tab is called Form
View and has many text boxes so the user can input data. The second tab
called Datasheet view. I am using a subform inside the second tab to get the
datasheet view. My problem is I want to some of my command buttons not be
visible when pressing the datasheet tab. When the user goes back to the Form
View I want the command buttons visible. Below is my code, What am I dong
wrong?, any help will be appreciated. Thank you in advance.

This is on Click event in the Datasheet View tab.

Me.cmdAdd.Visible = True
Me.cmdUndo.Visible = True
Me.cmdDelete.Visible = True

This is on Click event in The Form View tab
Me.cmdAdd.Visible = True
Me.cmdUndo.Visible = True
Me.cmdDelete.Visible = True
 
G

Guest

Hi,

Try changing your code for the datasheet view to this:
This is on Click event in the Datasheet View tab.

Me.cmdAdd.Visible = False
Me.cmdUndo.Visible = False
Me.cmdDelete.Visible = False
 
A

Alex Martinez

No that did not worked I actuall had the same code you had I just did not
posted it correctly in the news group. Thank anyway.
 
S

Shane S via AccessMonster.com

Alex,

You said that you have a subform on the Datasheet view tab. Are these
command buttons in that subform?

Shane

Alex said:
No that did not worked I actuall had the same code you had I just did not
posted it correctly in the news group. Thank anyway.
[quoted text clipped - 31 lines]
 
T

tina

answered in microsoft.public.access.forms.
please don't multi-post. it wastes server space, and the time of people who
are trying to help you. if you feel the need to post to more than one group
(usually not necessary), then please cross-post by adding both newsgroup
addresses to the same message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top