var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Changing the values on a Lookup list
I need to setup two lookup list on a form. When a user chooses a value on the first list, the second list will show some related choices. These choices need to be different on the second table, depending on the values chosen on the first table?
How do I go about setting this up?
You need to do a cascade if you look in http://www.fontstuff.com/access/acctut10.htm there is an example of how to achieve this.
Ok, first question is what sort of controls and recordsets are we talking about here? I'm guessing you're using two listboxes? Are you using two seperate tables or recordsets for the listboxes?
If for instance you have the following two tables:
(assume there are multiple options for each title)
You could assign t1 as the record source for the first list box (listbox1), then in the AfterUpdate event, you could set the recordsource for t2 accordingly:
listbox2.RowSource = "SELECT option FROM t2 WHERE t1_id = " & listbox1.Value
If you're using recordsets, you could do roughly the same thing using the filter property of the recordset. eg:
rsT2.filter = ("t1_id = " & listbox1.Value)
Thanks for the quick reply Sticker and Teddy. You guys are real life savers.