From: Bartus on 19 Feb 2010 13:33 I'm willing to create a concession sales program in access 2007, but I'm stuck. The concessions program will have two different Items 1. Sales Items 2. Menu Items, which contains 2 or more sales items I have created the following tables: tblOrders - OrderId - Date - TerminalNo. tblOrderDetails - OrderId - OrderDetailId - Itemtype (Sales or Menu Item) - Quantity - ItemId (Unique number of Sales or Menu Item, with a listbox the name is shown) - SalesPrice per Item - Discount tblOrderDetailsSub (will only be used if it is about a MenuItem) - OrderDetailId - OrderDetailSubId - ItemId (Unique number of Salesitem, with a listbox the name is shown) Also I have created the SalesItem tables tblSalesItems - ItemId - Itemtype (menu or sales) - ItemName tblSalesItemsSub (only for the menu items, which contains more than 1 sales item - ItemId - SalesItemsSubId - AssignedSalesItems (ItemId of Salesitem, with a listbox the name is shown) With above tables the appropriate records will be generate in the OrderDetails and OrderDetailsSub. This works already very well, a kind of switchboard access form will allow the user to select the sales or menu-items. The mainform contains the information of the OrderId But on this form I would like to create a list overview of all the selected sales items, which can be selected to modify (only with the buttons on the form, but the OrderDetailId must be retrievable. The list must look like: Quantity Item Price Total 1 Coca Cola 3.00 3.00 2 Fanta 3.00 6.00 1 Duo Menu 8.00 8.00 1 Coca Cola 1 Coca Cola 1 Popcorn Salt. 1 CandyBar 1.25 1.25 This means that the Duo menu, have 3 subrecords: Coca Cola, another Coca Cola and a Popcorn Salt. I can't figure out how to create this list. I have search for a ListView which allows sublevels, but as I am not a great visual Basic programmer I only get the Information displayed without the subrecords. Also I would like that the Listview sees the MainLevel and the SubLevel as one Item, so all the lines will be highlighted, for example if I select the Duo Combo in the list, the following will be highlighted: 1 Duo Menu 8.00 8.00 1 Coca Cola 1 Coca Cola 1 Popcorn Salt. Hopefully some one can help me to get this ItemList with one sublevel and how to create this. Please note that the Total column in this list is a sum, but this can also be calculated in a query if necessary.
|
Pages: 1 Prev: Problem with sizing Sub Forms on tabbed forms Next: sound clips in Access form |