Set Enable to Commandbar if certain condition is met...

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a unboun form having a combobox ([ID]). A detail subform is add to
display detail record in datasheet if the combobox ID is selected. The form
work alright. I added a toolbar consist of several button such as (New,
Edit, Print etc...).

My problem is that the Edit button in the toolbar is always enable even if
user did not select any value in combobox ([ID]) (this would lead to an
error)

Is there a way to disable the Edit button in the toolbar when the unbound
form is loaded and Enable the Edit button once the combobox ([ID]) is fill
with record?

SF
 
Hi SF,
Is there a way to disable the Edit button in the toolbar when the unbound
form is loaded and Enable the Edit button once the combobox ([ID]) is fill
with record?

I don't know. However, what about the possibility of just pre-selecting the
first record in the combo box for the user? That way, the [ID] should never
be null. Would that solution work for you?


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

SF said:
Hi,

I have a unboun form having a combobox ([ID]). A detail subform is add to
display detail record in datasheet if the combobox ID is selected. The form
work alright. I added a toolbar consist of several button such as (New,
Edit, Print etc...).

My problem is that the Edit button in the toolbar is always enable even if
user did not select any value in combobox ([ID]) (this would lead to an
error)

Is there a way to disable the Edit button in the toolbar when the unbound
form is loaded and Enable the Edit button once the combobox ([ID]) is fill
with record?

SF
 

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

Back
Top