[AccessD] Form Filter with ComboBox

Gustav Brock gustav at cactus.dk
Sun Dec 13 15:01:53 CST 2020


Hi Keith

Set the Filter property of the form in the AfterUpdate event of the combobox:

Me.Filter = "ProjectID = " & Me!ProjectCombo.Value & ""
Me.FilterOn = True

/gustav

________________________________
Fra: AccessD <accessd-bounces at databaseadvisors.com> på vegne af Keith Williamson <KWilliamson at designcollective.com>
Sendt: 9. december 2020 00:10
Til: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Emne: [AccessD] Form Filter with ComboBox

Hey guys,

I'm going so far back in my understanding (basically starting all over again) from Access97.  I've been pretty much only Excel programming for past 14 years.  I have a form, based on project records, with a combobox in the header area.  I want to filter my detail section to ONLY show records for the project I have input in the combobox.  Currently, it takes me to the first inastance of the input project (basically does a search instead of filter.)  But it does not filter for only that project.  I still have to cycle through the records.  I can't figure out what property I am messing up to not get a proper filter.  Sorry for such a basic question.

Thanks,

Keith E. Williamson
Chief Financial Officer
601 East Pratt Street, Suite 300
Baltimore, Maryland 21202
Tel 410.685.6655  | 100% Employee-Owned Design Firm
www.designcollective.com<http://www.designcollective.com>




More information about the AccessD mailing list