Prev: Newbie Sub calling question
Next: refresh information
From: Debra Ann on 19 Nov 2009 22:08 Access 2003 I have two combo boxes that have lookup queries from a table with two columns. I want the second combo box to automatically update to whatever the text is in the second column that matches the results of column 1: Table: Column 1 Column 2 A 1 B 2 C 3 So if I pick B from the dropdown of the first combobox, I was 2 to automatically show up in the second combobox. How do I do this? Thanks, DebraAnn
From: KARL DEWEY on 20 Nov 2009 02:00 Search 'Cascading Combos'. -- Build a little, test a little. "Debra Ann" wrote: > Access 2003 > > I have two combo boxes that have lookup queries from a table with two > columns. I want the second combo box to automatically update to whatever the > text is in the second column that matches the results of column 1: > > Table: > Column 1 Column 2 > A 1 > B 2 > C 3 > > So if I pick B from the dropdown of the first combobox, I was 2 to > automatically show up in the second combobox. > > How do I do this? > > Thanks, > > DebraAnn
From: Jeanette Cunningham on 20 Nov 2009 19:51 Me.[Combo1] = Me.[Combo2] = Me.[Combo1].Column(1) Replace Combo1 and 2 with your own object names. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Debra Ann" <DebraAnn(a)discussions.microsoft.com> wrote in message news:6B0E0A0A-C5E3-45F3-AF8C-0E131A4C6DED(a)microsoft.com... > Access 2003 > > I have two combo boxes that have lookup queries from a table with two > columns. I want the second combo box to automatically update to whatever > the > text is in the second column that matches the results of column 1: > > Table: > Column 1 Column 2 > A 1 > B 2 > C 3 > > So if I pick B from the dropdown of the first combobox, I was 2 to > automatically show up in the second combobox. > > How do I do this? > > Thanks, > > DebraAnn
From: Jeanette Cunningham on 20 Nov 2009 19:54 If the second combo is really a textbox, you can do it like this--> Assuming the textbox is unbound, you can put this in its control source. =[Combo1].Column(1) Replace Combo1 with your own object names. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Debra Ann" <DebraAnn(a)discussions.microsoft.com> wrote in message news:6B0E0A0A-C5E3-45F3-AF8C-0E131A4C6DED(a)microsoft.com... > Access 2003 > > I have two combo boxes that have lookup queries from a table with two > columns. I want the second combo box to automatically update to whatever > the > text is in the second column that matches the results of column 1: > > Table: > Column 1 Column 2 > A 1 > B 2 > C 3 > > So if I pick B from the dropdown of the first combobox, I was 2 to > automatically show up in the second combobox. > > How do I do this? > > Thanks, > > DebraAnn
|
Pages: 1 Prev: Newbie Sub calling question Next: refresh information |