Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    44

    Unanswered: Nice Problem....

    Hello again ,i have a nice problem to solve and i would really appreciate a little help here.

    I have a tipical order details subform in row style.
    I have a picture of ,for example,of a coffee cup in a beside the order details indipendent form.

    I want to be able to do that : each time i click in to the picture the word "Cup of Coffee" must appears on the Product Description row of the Order Details and in the Qty field must appear the number equal to the clicks ive use (the sum of all clicks).
    Its clear enough ? I mean if i click 3 times should look like this :

    Product Descpription------ Qty
    Cup of Coffee------------- 3

    and so on for the next row with any kind of the products pictures.
    Any help around here ??

    Thanks a lot folks.

    Regards from Cla
    Last edited by Claudio_V; 03-10-05 at 11:34.

  2. #2
    Join Date
    Dec 2003
    Posts
    268
    on the form I would declare some variable to hold the value of the incriment


    Option Compare Database 'should be at the top of your form

    dim ItemCounter as integer

    on the click event of the object control

    itemcounter = itemcouter +1

    me.txtQtydisplay = itemcounter


    That should do it.

  3. #3
    Join Date
    Mar 2005
    Posts
    93
    I would use a temporary table to store the order details. The data source of the subform will be either that table or a query of it, group by product ID (it depends on how I design the temp table). I would design something like this: tempOrderDetails (ProductID, Quantity). The code for the Add button will be something like:
    If ProductID exists, update Quantity = quantity+1
    else insert into the table the product and quantity=1

    Similarly, you can add a button for substract as well.

    However, what happens if a customer wants to order a quantity of 100? It is clearly better if we have an input box for the added or deleted quantity.

  4. #4
    Join Date
    Oct 2003
    Posts
    44

    Reply

    Many thanks to all of you.I certain have 2 more ideas now to develop this application.
    You wrote : However, what happens if a customer wants to order a quantity of 100? It is clearly better if we have an input box for the added or deleted quantity

    That would be a problem,but because im making the appli. for a small restaurant maybe i can survive to this.Dont know.
    Anyway ill studing your solutions and i will let you know about it.

    Thanks a lot again.
    Regards,Claudio

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •