By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Cmd Button enabled based on combo box

P: n/a
I am really struggling to get to grips with this issue, would grateful
for any advice.

I have a form 'Applicant_Person' with various student contact data.
There is a combo box to 2 options of either 'Enquiry' or 'Application'.
If 'Enquiry' is chosen then cmd button 'Interviews' needs to be
disabled.
If 'Application' is chosen then cmb button 'Interviews needs to be
enabled.

I have managed to get this to work via a macro on the 'On Exit' of the
combo box. However this only works if the inputter is creating a new
record or changes the combo on an existing record.

What I need to happen is that when the 'Applicant_Person' form is first
opended populated with a students data, the cmd button is
enabled/disabled dependant on what is in the combo box at that time.

If I put the code into the 'on open' of the form, this would only work
when the form first opened.

I am really stuck and as you can probably tell I have limited
experience.
Many thanks
Carl

Aug 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 17 Aug 2006 08:15:30 -0700, zack wrote:
I am really struggling to get to grips with this issue, would grateful
for any advice.

I have a form 'Applicant_Person' with various student contact data.
There is a combo box to 2 options of either 'Enquiry' or 'Application'.
If 'Enquiry' is chosen then cmd button 'Interviews' needs to be
disabled.
If 'Application' is chosen then cmb button 'Interviews needs to be
enabled.

I have managed to get this to work via a macro on the 'On Exit' of the
combo box. However this only works if the inputter is creating a new
record or changes the combo on an existing record.

What I need to happen is that when the 'Applicant_Person' form is first
opended populated with a students data, the cmd button is
enabled/disabled dependant on what is in the combo box at that time.

If I put the code into the 'on open' of the form, this would only work
when the form first opened.

I am really stuck and as you can probably tell I have limited
experience.
Many thanks
Carl
Use the Combo Box AfterUpdate event, qs well as the Form's Current
event.
On the Combo box's AfterUpdate event line, write
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code. Between those 2 lines write:
Me![Interviews].Enabled = Me![ComboName] = "Enquiry"
Save the changes.
Then do the same thing on the form's Current event, using the same
code line.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.