Results 1 to 5 of 5
  1. #1
    shod90 is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Jan 2016
    Posts
    134

    Increase counter when same product given


    Dear Gents,
    Currently Um working on cashier system but facing a little bit annoying issue
    I need to make the program to be more smart in order to be easy for users.
    Now if the cashier man passes 1 product 2 times i need to make the program automatically detect that this was same product and increase the qty to be 2 not making another line and make the qty. 1
    is it possible ?

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Do you mean...

    Test if the product is the same as the previous row and if so change the previous row quantity to 2


    Sent from my iPhone using Tapatalk

  3. #3
    shod90 is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Jan 2016
    Posts
    134
    Yes Exactly , But not a rule if the previous row only is same , I need to check the whole records in same order number.
    example:
    Product 1 ----- qty 1
    product 2 ----- qty 1
    product 1 ----- qty 1

    i need to make it as follows

    product 1 --- qty 2
    product 2 --- qty 1


    I hope you understand the idea .

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Sounds like you need a grouped query?


    Sent from my iPhone using Tapatalk

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Click image for larger version. 

Name:	shoppingCart.jpg 
Views:	6 
Size:	30.1 KB 
ID:	27917
    I agree you need a Group BY query in the logic to review the contents of the shoppingCart.
    Sometimes there is a special eg $1.39 each or 3 for $3.00.

    Shopping cart could be a Temp table or an Array

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 27
    Last Post: 12-02-2015, 06:09 PM
  2. Replies: 7
    Last Post: 04-30-2015, 02:09 PM
  3. Replies: 6
    Last Post: 02-28-2015, 11:57 AM
  4. Replies: 2
    Last Post: 08-14-2014, 11:49 AM
  5. Replies: 3
    Last Post: 02-26-2013, 05:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums