Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2013
    Posts
    3

    Unanswered: limits for maximum values of each field in the table

    Hi everybody I looking for a solution to my problem. I have a access database and I have to put some limits for maximum values of each field. Let’s say there is lots of different customers and they have some limit numbers of orders, which they can order. For each customer is this limit different. I want to keep adding new orders till the limit is reached and then can’t be add any more numbers for new orders for each customer. Is there any way how I can set in access database this limits? Thank you for any help in advance.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so define explicit limits per customer, presumably per product, probably best done as an intersection table

    or if the limit is financial then you need to know what a customers credit limit is, what their current indebtedness is and the sale price of products is, and when they get near the limit remind the cusotmer order taking
    when they exceed the limit stop further items being ordered. whether you allow a customer to order up to their limit or say in effect you are near the limi tthis order will exceed the limit and therefore cannot be accepted is up to the business rules.

    you could use the domain function such as dcount or dsum
    if this is a relatively heavy hit then you will almost certainly be better off using a recordset. domain function are great for occasional use (say 4 or 5 per screen), but they are performance hogs if you are using tens or more per screen. FWIW I once shaved 4:45 from a 5 minute report by removing domain functions and replacing with recordset operations. the 'expense' is the opening up of the connection in the domain function.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2013
    Posts
    3
    Im really beginer in this field. I add to the topic picture of the sort of structure. This is already a query from some other tables. so if i want to put the limit for each field of the orders I have to use those functions- dcount or dsum?

    I try to figure out this already a while,

    thank you for your help
    Attached Thumbnails Attached Thumbnails Untitled.jpg  

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    take a step bakc from the design bit right now
    what is the limit supposed to represent
    what is its practical purpose
    why would a limit come into play
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2013
    Posts
    3
    There is some pack, which can be taken...some will take one order(one piece) some will take 10 orders...but there is limit over all...and thats just the pack which exist, we can go over that limit...thats why i have to put difrent limit for all orders for each customer...is it possible to do it easy by some function or do I have to use VBA?

Posting Permissions

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