473,322 Members | 1,398 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,322 software developers and data experts.

Disable field based on entry in another field

I have a field that uses a drop-list. When I select one of the options from the list, I'd like to make another field (it's a Yes/No field) on the form disabled, to ensure the user doesn't try to use it.

I thought I could create an expression, using the IIF statement (thinking it was just like Excel); but haven't found how to deactivate the other field.

Does anyone have any suggestions?
Thank you - much appreciate your help.
Love this website!
Dec 21 '06 #1
3 19995
MMcCarthy
14,534 Expert Mod 8TB
I have a field that uses a drop-list. When I select one of the options from the list, I'd like to make another field (it's a Yes/No field) on the form disabled, to ensure the user doesn't try to use it.

I thought I could create an expression, using the IIF statement (thinking it was just like Excel); but haven't found how to deactivate the other field.

Does anyone have any suggestions?
Thank you - much appreciate your help.
Love this website!
You will need to create an After Update event on the combo box (drop down list) to disable or lock the other control. BTW, I am assuming you are talking about a form here as none of this can be done on the table.

You will need something like this.

Expand|Select|Wrap|Line Numbers
  1. Private Sub comboName_AfterUpdate()
  2.  
  3.    If Not IsNull(Me.comboName) Then
  4.       Me.CheckboxName.Locked = False ' User can't change the value
  5.    Else
  6.       Me.CheckboxName.Locked = True
  7.    End If
  8.  
  9. End Sub
  10.  
Mary
Dec 21 '06 #2
Hi Mary,

Thank you SO much for your lovely solution!
It works great !!!

I've included a few other fields as well that need to be deactivated.
(one day I'll get into VBA)

Thanks again Mary - much appreciate your assistance.
Lori
Dec 21 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi Mary,

Thank you SO much for your lovely solution!
It works great !!!

I've included a few other fields as well that need to be deactivated.
(one day I'll get into VBA)

Thanks again Mary - much appreciate your assistance.
Lori
You're welcome Lori and Merry Christmas

Mary
Dec 21 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: jochen scheire | last post by:
Is there a way I can calculate a field in a form based on another field in the same form. When clicking submit, both values should be posted to the next page. I want to be able to type in a value...
0
by: Alienz | last post by:
Hey all. if anyone is REALLY bored please help moi. I am new to access stuff and am probably missing something obvious here. I have 2 tables that are linked via "number" in the relationship...
2
by: AA Arens | last post by:
Somebody willing to assist me in the following? I want to have values from one field copied to another field when I choose choose a item from a drop down menu. I have 2 forms: 1 Company...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
2
by: Chippy | last post by:
I am having trouble working out how to update a field on an open form with a calculation based upon calculations from other tables! For example, I have 3 tables: Diary Diary_ID: autonum,...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
2
by: bkunjitam | last post by:
Hi, I am using Python 2.5. I have an entry field and a radio button. I need to disable the entry field when the radio button is selected. How do i change the state to DISABLED in run time. ...
2
by: David - Australia | last post by:
G'day from Australia, I'm hoping some bright spark may be able to help me with this one. I'm sure that it can be done, I've just hit a wall with it. So I'm opening it up. I'm storing student...
5
by: lsimonelli via AccessMonster.com | last post by:
On a form, how do I require entry of a field based on the data in another field? I do not want to require at the table level. I have a field that the user selects where a refund goes. If they...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.