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

Disable field based on entry in another field

P: 4
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
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
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

P: 4
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
Expert Mod 10K+
P: 14,534
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

Post your reply

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