Re: How to limit Access listbox lookup query using another field

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Given that I'm using this just in a table, not a form, I'm still not sure how
to refer to the listbox in a different field. Is this not possible in a
table? I can't figure out how to refer to the value in another field to put
in a WHERE clause of a query for another field's listbox.

"Ken Snell (MVP)" wrote:

See this article -- it discusses comboboxes, but is equally applicable to
listboxes:
http://www.mvps.org/access/forms/frm0058.htm
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"PJD" <PJD@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8FCD929D-BFD6-40E9-A590-931357FAD16B@xxxxxxxxxxxxxxxx
In a table I'm wanting to have a field be a listbox where the selectable
values are grabbed from a second table. I want to limit this using the
value
in a different field of the first table... how do I specify this in the
query.

Lets say I have fields Level1 and Level2 in Table1 and a list in a table
called Topics that has TopicL1 and TopicL2 as the allowable level 1 and
level
2 topics. In the first table I've got a query that limits the entry for
Level1 to the values in TopicL1 of Topics. I can't figure out how to
construct a query for a listbox for Level2 that uses the value in Level1
to
limit the TopicL2 entries shown to only those with a matching TopicL1 =
Level1 value.

I'm fairly new to databases and Access... all help greatly appreciated.

Thanks



.



Relevant Pages