Hello all
My problem is the following: (i use ms access)
I have a table named ProductCategories and many other tables named Coffees, soft drinks, juices, Alcohol, etc etc
The ProductCategories table contains the following values: coffees, soft drinks, juices etc,etc.
As you understand each value of the ProductCategories table is a seperate table itself. The coffees tables contains: espresso, filter coffee, etc
The soft drinks table contains: coca cola, orange juice, lemonade etc.
Now, i have 2 listboxes. Listbox1 is populated with the data of the ProductCategories table. (coffees, juices, alcohol etc).
So far ok.
I want listbox2 to be populated with the data of each other product table.
for example. I want to click on the coffee item in listbox1 and automatically the listbox2 to get populated with the data from the table "coffees".
Or differently, when i select an item from listbox1, by clicking a button to populate listbox2 with the values from the relative product table.
I know i must use the selecteditem methos but it gives me error.
I ve searched the whole net but i cant find any helpful sites.
Normally the pseudocode has to be like this:
If listbox1.selecteditem = "coffees" then
populate listbox2 with values from "coffees" table.
I also know it can be done using, the case method.
Any help would be much appreciated.
My problem is the following: (i use ms access)
I have a table named ProductCategories and many other tables named Coffees, soft drinks, juices, Alcohol, etc etc
The ProductCategories table contains the following values: coffees, soft drinks, juices etc,etc.
As you understand each value of the ProductCategories table is a seperate table itself. The coffees tables contains: espresso, filter coffee, etc
The soft drinks table contains: coca cola, orange juice, lemonade etc.
Now, i have 2 listboxes. Listbox1 is populated with the data of the ProductCategories table. (coffees, juices, alcohol etc).
So far ok.
I want listbox2 to be populated with the data of each other product table.
for example. I want to click on the coffee item in listbox1 and automatically the listbox2 to get populated with the data from the table "coffees".
Or differently, when i select an item from listbox1, by clicking a button to populate listbox2 with the values from the relative product table.
I know i must use the selecteditem methos but it gives me error.
I ve searched the whole net but i cant find any helpful sites.
Normally the pseudocode has to be like this:
If listbox1.selecteditem = "coffees" then
populate listbox2 with values from "coffees" table.
I also know it can be done using, the case method.
Any help would be much appreciated.