Set Record source of Combo box

Taff

Registered User.
Local time
Today, 11:05
Joined
Feb 3, 2004
Messages
158
Hi all,

I have a form with a combo box on it and what I would like to do is when I click a command button, change the record source of the combo box from the query I currently have to a different one?

Is this possible,

Thanks for your time.

Taff.
 
Can't you just change the row source to another sql statement or pre-built query?
 
First off, comboboxes don't have a RecordSource property - they have a ControlSource and a RowSource. The ControlSource is what binds it to a field in the form's RecordSource. But you obviously mean the RowSource ;) which is done like this:

Code:
Me.MyCombo.RowSource = "MyQuery"

You may have to set the RowSourceType property also.
 
Thanks for the reply SJ,

I did mean Rowsource, you can tell its Monday.

Works great.

Taff.
 
Sorry Ken,

Thanks for the reply :) .

Taff.
 
It's ok... Warm & fuzzy again. I know Stew's the juice around here. :o
 

Users who are viewing this thread

Back
Top Bottom