List Box Option

  • Thread starter Thread starter JAMESEBBS
  • Start date Start date
J

JAMESEBBS

Guest
Hi,

I have a combo box which has a list of sales advisors ID code.

What I want to do is, based on a say a check box, run one query to fill the rows with info or run a different one.

So basically I guess what I want to do is have an IF statement that says if checkbox is ticked then do that query or the other query.

I dont know how to get it to fill in the combo box with the results....

Anybody any ideas or know what I'm talking about?

Cheers

Jim
 
The If statement would adjust the RowSource of the combo box. It would look like this (you might put this in the OnClick event of the checkbox, or elsewhere):


If Me.CheckBoxName = True Then
Me.ComboBoxName.RowSource = "<SQL Statement or query name>"
Else
Me.ComboBoxName.RowSource = "<other SQL Statement or query name>"
End If
Me.ComboBoxName.Requery
 

Users who are viewing this thread

Back
Top Bottom