2003Learner
New member
- Local time
- Today, 09:32
- Joined
- Feb 13, 2011
- Messages
- 3
I am currently writing a recipe database and I have drawn a blank when trying to resolve an issue with data to and from list boxes.
My form includes two list boxes. One contains a list of available recipes and the other holds the selected recipes. But here is the twist. When I click on a button to add a recipe from list box 1 to list 2, I have a text box that collects a quantity value and I want to add this value to the end of the data taken from list box 1 before I add this to list box 2.
So the concept = List box 1 (Item) + quantity added to list box 2
I created a query AddMeuToList and changed list box 2 rowsourcetype to Table/Query and rowsource to the query I created. The properties on list box 2 have been changed to allow multiple columns and I have set column widths etc. When I run the code as a test, all I get is the column headers (taken from the query) and none of the data. I changed the query just to try to get the basic information without the quantity value but it still does not work. The code for the query is as follows:-
SELECT RECIPE.RID AS Record, RECIPE.RNAME AS Recipe, RECIPE.RCATEGORY AS Category, RECIPE.RVEGETARIAN AS ['Vegetarian?']
FROM RECIPE
WHERE (((RECIPE.RID)=Forms!MakeMenu!ListRecipeList.ListIndex+1));
Any idea how I can make list box 2 accept the values from list box 1 and is there a way to get the quantity value appended to the end of the data from list box 1?
My form includes two list boxes. One contains a list of available recipes and the other holds the selected recipes. But here is the twist. When I click on a button to add a recipe from list box 1 to list 2, I have a text box that collects a quantity value and I want to add this value to the end of the data taken from list box 1 before I add this to list box 2.
So the concept = List box 1 (Item) + quantity added to list box 2
I created a query AddMeuToList and changed list box 2 rowsourcetype to Table/Query and rowsource to the query I created. The properties on list box 2 have been changed to allow multiple columns and I have set column widths etc. When I run the code as a test, all I get is the column headers (taken from the query) and none of the data. I changed the query just to try to get the basic information without the quantity value but it still does not work. The code for the query is as follows:-
SELECT RECIPE.RID AS Record, RECIPE.RNAME AS Recipe, RECIPE.RCATEGORY AS Category, RECIPE.RVEGETARIAN AS ['Vegetarian?']
FROM RECIPE
WHERE (((RECIPE.RID)=Forms!MakeMenu!ListRecipeList.ListIndex+1));
Any idea how I can make list box 2 accept the values from list box 1 and is there a way to get the quantity value appended to the end of the data from list box 1?