[AccessD] Form Filter with ComboBox

Rocky Smolin rockysmolin2 at gmail.com
Sun Dec 13 15:08:35 CST 2020

First, you have to unbind that combo box from the control source, which I
guess is project.  Just replace it with another text box bound to the field
Project, or Project ID if you've got a separate table for project name with
a PK and the Project ID is in the project detail record as an FK.

Then in the after update event of the combo box (which has a row source
that shows all of the projects), create a filter for the form:

Me.filter = "fldProjectID = " & val(cboProjects.column(0))

' This assumes that the row source of the combo box is a query which
shows all of the projects with the Project ID on column 0 and the project
name in column 1. Otherwise Me.Filter = "fldProject = '" &
cboProject.column(0) & "'"

' Then



On Sun, Dec 13, 2020 at 12:04 PM Keith Williamson <
KWilliamson at designcollective.com> wrote:

> 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
> [cid:image001.png at 01D6CD8D.73270C30]
> [cid:image002.png at 01D6CD8D.73270C30]<https://twitter.com/designcollectv
> >[cid:image003.png at 01D6CD8D.73270C30]<
> https://www.linkedin.com/company/design-collective-inc./
> >[cid:image004.png at 01D6CD8D.73270C30]<
> https://www.instagram.com/designcollectv>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

More information about the AccessD mailing list