Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2002 - Enable Field when other one is selected 2

Status
Not open for further replies.

MaffewW

Technical User
Apr 9, 2002
438
GB
Hi, I have made a fairly basic access form with some drop downs on, its for a questionnaire.

I've a combo box called Calltransferred. If the value in this box is selected as 'Yes', then they need to fill in the next combo box called Callreasonagainaftertransfer which also just has a Yes or No.

If its not 'Yes' I'd like to keep the second box disabled

Dont normally do anything with Access so can you do this without delving into VBA (or is it easy to do)? its not the end of the world if i cant though it would be a nice touch

thanks

all the best

Matt

Matt

Brighton, UK
 
Matt

in the after update property of Calltransferred combo
add this code


If Me.Calltransferred = "Yes" Then
Me.Callreasonagainaftertransfer.Enabled = True
Me.Callreasonagainaftertransfer.SetFocus
Me.Callreasonagainaftertransfer.Dropdown
End If

best of luck

jimmy
 
Thats great Jimmy thanks and does almost what I want other than when I move on to the next record the Callreasonagainaftertransfer box remains disabled. Could you point me in the right direction please

cheers mate

Matt

Brighton, UK
 
Try putting the same code in the OnCurrent event for the form as well.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
when you use the code in the oncurrent event omit the lines

Me.Callreasonagainaftertransfer.SetFocus
Me.Callreasonagainaftertransfer.Dropdown

jimmy
 
cheers guys, had got it working just before Clydes 2nd post and done it so it diasables the box again if it gets selected to no

nice one

Matt

Brighton, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top