473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Cmd Button enabled based on combo box

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
1 2185
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
14
by: Steve Chatham | last post by:
I have a combo box that gets populated with a group of items based on a sql table. I had in mind that I'd insert a value at the beginning of that combo box, that'd say "No Item Selected" and...
0
by: Brian Campbell | last post by:
I have some code that may be of some help to us newbies. It is for when you have a form with say two radio buttons, each activating/focusing its respective combo box and making its initial value...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
4
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an edit button on my web page. what is the quickest or best way to link the Enabled property of the button on the aspx page to the User's Table Permissions if it has been granted...
1
by: Ron | last post by:
Hi all, I've got a combo box control (cboYoMomma) on a main form (frmMain) that I want to enable only if a subform (sfrmSubForm) does not have any records in it. But, once there are records in...
4
by: seangibson | last post by:
Is there a way to change the appearance of my form based on which option button is selected? I am using a form to input data into a table of transactions. There are basically 3 types of...
4
by: Whasigga | last post by:
Hi I've created a form that has 7 subforms. It is the same subform, bound to a table, just repeated. This form represents a week, and each subform is used to enter in data for each day of the...
5
by: andersond | last post by:
I need to enable or disable a submit button based on the value of a data field stored in a database. I have found working examples of how to enable or disable based on a checkbox; but, I need it to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.