P
paul.schrum
Access 2007, programming in 2003 mode.
I have a table "tbl_tasks" which is the main table of my application.
Several of its fields are lookups into other tables such as
tbl_persons and tbl_urgencies.
On one or more of my forms, I want to be able to filter list boxes via
queries tied into the combo boxes. As an example, tbl_urgences
consists of
urgencyID urgencyText
1 High
2 Standard
3 Low
I want to enable the user to filter what shows up in list boxes based
on a combo box which would take its values from tables like
tbl_urgencies, but also give them an option of "All" such that the
urgencies combo box would have a drop-down like
All
High
Standard
Low
in which "All" is prepended to the list otherwise taken from the
table.
I can't figure out a quick and convenient way to do this. I know I
can set the Row Source programatically, but how to abstract this
operation into a single function is baffling me. I want to have "All"
for many of these filters of peripheral tables. That is why I want to
abstract the setup of this into a function.
Can anyone offer advice on this? Thanks.
- Paul Schrum
I have a table "tbl_tasks" which is the main table of my application.
Several of its fields are lookups into other tables such as
tbl_persons and tbl_urgencies.
On one or more of my forms, I want to be able to filter list boxes via
queries tied into the combo boxes. As an example, tbl_urgences
consists of
urgencyID urgencyText
1 High
2 Standard
3 Low
I want to enable the user to filter what shows up in list boxes based
on a combo box which would take its values from tables like
tbl_urgencies, but also give them an option of "All" such that the
urgencies combo box would have a drop-down like
All
High
Standard
Low
in which "All" is prepended to the list otherwise taken from the
table.
I can't figure out a quick and convenient way to do this. I know I
can set the Row Source programatically, but how to abstract this
operation into a single function is baffling me. I want to have "All"
for many of these filters of peripheral tables. That is why I want to
abstract the setup of this into a function.
Can anyone offer advice on this? Thanks.
- Paul Schrum