combo-box help (1 Viewer)

awake2424

Registered User.
Local time
Today, 15:41
Joined
Oct 31, 2007
Messages
479
I have a combo-box (Results) that has a drop-down in which either Negative or Positive can be selected. If Negative is selected can a text-box (Data) be populated with the text "nothing detected", but if Positive is selected then Data remains empty?

Code:
=IFF([Results])="Negative",([Data])="nothing detected",0 (forgive my attempt at the code).
Thank you.
 

Trevor G

Registered User.
Local time
Today, 21:41
Joined
Oct 1, 2009
Messages
2,341
From the ComboBox you can add the following code to the After Update Event. Make sure you adjust the names to what you are using.

Private Sub cboResult_AfterUpdate()
If Me.cboResult = "Negative" Then
Me.txtResult = "Negative"
Else
Me.txtResult = ""
End If

End Sub
 

Users who are viewing this thread

Top Bottom