If I'm understanding what you're doing correctly..
You seem to be missing a where clause. In the afterupdate even of cmbbox1
you're going to need to set the rowsource with something like..
If your ID is a string then use:
Me.cmbBox2.RowSource = "SELECT DISTINCT [Invoice
Tracker].cmbTrackerFields.value FROM [Invoice Tracker] WHERE [Invoice
Tracker].[WHATEVER ID FIELD] = '" & me.cmbbox1.value & '" ORDER BY [Invoice
Tracker].cmbTrackerFields"
If it's numeric ( no quotes needed around criteria value ):
Me.cmbBox2.RowSource = "SELECT DISTINCT [Invoice
Tracker].cmbTrackerFields.value FROM [Invoice Tracker] WHERE [Invoice
Tracker].[WHATEVER ID FIELD] = " & me.cmbbox1.value & ' ORDER BY [Invoice
Tracker].cmbTrackerFields"
Ayo said:
Thanks.
Need help with something else, hope you can help. I have 2 cmbBoxes and I
want one to update the other.
cmbBox1:
Row Sorce Type = Field List
Row Source = Invoice Tracker
cmbBox2:
Row Sorce Type = Table/Query
Row Source = SELECT DISTINCT [Invoice Tracker].cmbTrackerFields.value FROM
[Invoice Tracker] ORDER BY [Invoice Tracker].cmbTrackerFields;
What I want to do is, when I select a field title in cmbBox1, I want cmbBox2
to be updated with a list of all (distinct) the values in the field. I think
I am getting the Row Source property value wrong.
Can you take a look and tell me what I am doing wrong? Thanks.
Lance said:
wow.. thought I cancelled those first two before posting. Just ignore them
:
Thanks Lance. iwill try these and let you know how it goes.
:
Drop something like the following in the afterupdate event of your combobox
Me.Form.Filter = "[F1] = '" & Me.Combo0.Value & "'"
Me.Form.FilterOn = True
:
I have a form that I use to input my data. I just added a cmbBox to the form
and I want to you it to filter the database. So that when I select a value in
the cmbBox I want the Record at the bottom of the form to show the number of
data that as being filtered so that I can then go through them and make my
edits.
How do I do this?
Thanks