One option in combo box to do something different?

laxster

Registered User.
Local time
Yesterday, 23:27
Joined
Aug 25, 2009
Messages
145
Hi,

I have a dropdown combo box which allows users to record values to a table. However, I have one value in which I would like a different form to pop up immediately upon selection.

How would I go about doing this?
 
With some VBA you can achieve this. You would construct an IF statement checking against that value and put that block of code in the AFTER UPDATE event of your combo box. The syntax is:

Code:
If Combobox1.ListIndex > -1 And Combobox1.Value = "The Value" Then
     Docmd.OpenForm "Name of form to open"
End If
Lookup the IF statement in the help files for a better understanding.

NB: This is assuming the value you are checking against is the value of the bound column (or you have one column - which in effect would be the bound column)
 

Users who are viewing this thread

Back
Top Bottom