Filter on dropdown

arthurmq

Board Regular
Joined
May 29, 2004
Messages
81
I have a form in Access that displays the rows of a linked table. I place a filter on a dropdown in order to filter the form by the first column values on this table. The dropdown values are populated by a query that pulls the unique values on the first column of this table.
However the filter does not works unless I retype the values directly on the first column of the linked table.
Any suggestion will be greatly appreciated. Thank you

This is the code I’m using for the filter.

Me.Filter = "[CCB]![F1]= [CCB_F]!Combo14"
Me.FilterOn = True
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
i had a similar issue i just added a button that requeried the data and it worked fine for me. if you could post an example of your database i could take a look at it or just pm me and i will help you with it.

thanks
chad
 
Upvote 0
I don't know how to post the whole database, but if you can tell me how to apply the requery. Is this a button on the form executing a requery macro into the linked table?

Thank you
 
Upvote 0
The way that i have mine set up is i have 3 unbound fields on my unbound form. 2 of the fields are date fields and the 3 one is the combo box field and after i put in the dates i then drop down the combo box and it shows my data. i then have a button that goes and gets the information for my subforms on my main unbound form. here is an example of what i have behind the onclick event of my button.

Private Sub Command7_Click()
Me.sa_subform_singlesite.Form.RecordSource = "qryCampaignName"
Me.sa_subform_singlesite.Form.Filter = "[Office] = 'sa'"
Me.sa_subform_singlesite.Form.FilterOn = True
end sub

and then i have:

Private Sub Form_Close()
Me.sa_subform_singlesite.Form.RecordSource = ""
end sub

and after i click the button and my data is there alls i have to do is pick a diffrent item from my combo box and it automatically requerys all my subforms.

if you could zip up your database and email it to me i could take a look at it.

thanks
chad
 
Upvote 0

Forum statistics

Threads
1,221,902
Messages
6,162,726
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top