Form to add records

Noel96334

New member
Local time
Today, 07:05
Joined
Jun 12, 2011
Messages
12
Hi,

I have a DB with the orders in a restaurant.

Now I want to make a form where I can make a selection of the products and the quantity of the selected products.

These selection have to be added into the open orderform.

After that, all the values have to reset.

I already created a kind of form for that, but I can not realize it to add the selected products into the open order.

I don't know match about VB.

Any help would be appreciated.

Thanks.
 

Attachments

Are you trying to add new entries? That would be an UPDATE query OR are you trying to add quantities (a little tricker with your table set up...

Code:
UPDATE tblOrderDetails SET tblOrderDetails.Quantity = [Quantity]+[Forms]![frmProductSelection]![cboQuantityCoffee]
WHERE ((([Forms]![frmProductSelection]![chCoffee])=True) AND ((tblOrderDetails.ProductID)=2) AND ((tblOrderDetails.OrderID)=[Forms]![frmProductSelection]![txtOrderID]));

The above needs a field txtOrderID added to frmProductionSelection. It would also require hard coding the above for each Product.



Hi,

I have a DB with the orders in a restaurant.

Now I want to make a form where I can make a selection of the products and the quantity of the selected products.

These selection have to be added into the open orderform.

After that, all the values have to reset.

I already created a kind of form for that, but I can not realize it to add the selected products into the open order.

I don't know match about VB.

Any help would be appreciated.

Thanks.
 
Hi,

Thank you for the reply.
Finally, I try to create a form to add the products and the quantity of these products. These products and the quantity have to be added into the open orderform. So, I can add the complete order from one table (several individuals) at once. I'm looking for the most simplest way to do that, not necessarily with these form. Maybe you can give me some advice about that.
Thanks.
 
Okay before I make any suggestions...

1. Will you ever have to remove Products?
2. Is this going to be used like an Inventory database? What I am asking is what business issue is this suppose to solve?
 
Hi,
Thanks for the reply.
First question: yes, regular add new products, delete older products.
second question: no, for the waiters an overview of the tables, orders, products and prices. For me, a daily overview of the sales, money received, number of clients etc.
but not an inventory of the products.

Thanks.
 
Okay, let me say this... I would not do the Add Products menu that way because you are going to have to hard code every query, which will be for every product, and that could end up being alot of queries. (Both UPDATE queries and APPEND queries depending on whether you are going to update the quantity or add the quantity, see my queries in the attatchment.)

It might be better, if you want to list all of the products, to use a Option Group that way you can coordinate the numbers to the Product ID's...

OR

Create UPDATE buttons on each line item thereby eliminating the *Add Products* menu altogether. They ADD items by simply going to a new line.
 

Attachments

Users who are viewing this thread

Back
Top Bottom