Code to input a word into a field if anotner field is Yes

tonylpcs

Registered User.
Local time
Yesterday, 22:34
Joined
Feb 15, 2011
Messages
27
Hi Everyone,

Can someone please give me the code to do the following?

If Combobox500 value = "Yes" then Combobox600 value = "We Are Here And Staying" if not then Combobox600 value is ""

please help me!

thanks

Tony
 
When do you want this to happen? I think the first step would be to decide which event you would like to occur before this change is made. By the sounds of it, you want this to happen after Combobox500 is updated?

If so, in the AfterUpdate event for Combobox500 you would have something like this:

Code:
If Me.Combobox500 = "Yes" Then
     Me.Combobox600 = "We Are Here And Staying"
Else
     Me.Combobox600 = ""
End If

Now if these combo box's have bound columns then it's a little different.
 
Last edited:
I will amend that slightly:
Code:
If Me.Combobox500 = "Yes" Then
     Me.Combobox600 = "We Are Here And Staying"
Else
     Me.Combobox600 = [COLOR=Red]Null[/COLOR]
End If
It will still go in the same event harmankadon advised.
 

Users who are viewing this thread

Back
Top Bottom