read only form - command buttons

K

kids23bball

I have a form that I use for adding new records. I then later open the form
in read only. Is there a way to not display a command button when I open the
form in read only.
 
T

tina

sure. if you're opening the form with an OpenForm command, follow that line
of code with another to hide the button, as

Forms("FormName")!CommandButtonName.Visible = False

hth
 
S

sue gray

awesome thanks

tina said:
sure. if you're opening the form with an OpenForm command, follow that line
of code with another to hide the button, as

Forms("FormName")!CommandButtonName.Visible = False

hth
 
S

sue gray

I just had another thought. Is there a simple way to make the fields on the
whole form not selectable. I have it opened read only, but when I click on
drop down fields I see the choices. I would like to make the whole form
locked down. Thanks.
 
L

Linq Adams via AccessMonster.com

You can drop down the combobox, but it is "not selectable" i.e you cannot
select an item from it. To prevent it from dropping down, use code like Tina
suggested for hiding the command button:

Forms("FormName")!ComboboxName.Enabled = False
 
S

sue gray

thanks for the help. Is there a way to do the whole form instead of listing
every combobox. THank you.
 
Top