Results 1 to 3 of 3
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Coimbatore, India

    Message Box

    Cotton Seed deliveries against Specific Contracts are entered in a Form. In the Main form, Contract data appears on selecting the Contract Number in a Combo Box.

    Deliveries are entered in the Subform. Deliveries are made against payment.

    What I want to know is that if the Delivery entry is mistakenly entered so that the total deliveries exceed the contracted quantity, a Message Box should appear & on clicking the button on the Message Box, the cursor should go to the last record of the Subform to make correction.


  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Ottawa, Ontario, Canada; West Palm Beach FL
    Deliveries are made against payment.
    Shouldn't Delivered quantities be compared with Contracted quantities? Perhaps that's what you are doing.
    If the Total delivered quantity exceeds the current total contracted quantity, then some anomaly exists.
    Here, the anomaly is recognized as "some accounting/typo/conflict exists".
    How do you determine what exactly is in error? Wrong account; mistyped value...?
    If you are convinced that you can identify the "anomaly", then, if you were using transaction logic, you could reject the transaction.

    You could have identified the "issue" in some control event logic -probably a before Update event - where you make the quantity comparison and reject the action (do not save the record).

    I would suggest reviewing your logic and see if validation/comparison of quantities in the before update event would/could accomplish what you are asking.

    Good luck.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Ontario, Canada
    One other thing about the logical flow (when the rest is sorted out) - why the last record? What if the 3rd record is where the incorrect entry is? Maybe there's a typo there and the number isn't exceeded until 4 records later. Is there truly a point in setting the focus to the last record? I assume this is not a 1 record entry at a time thing, otherwise there would be no "last" record, there would be only 1 record.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

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

Similar Threads

  1. Replies: 3
    Last Post: 05-13-2018, 12:59 AM
  2. Replies: 7
    Last Post: 03-17-2016, 05:53 PM
  3. Replies: 2
    Last Post: 01-23-2014, 12:40 PM
  4. Replies: 15
    Last Post: 11-01-2013, 03:24 PM
  5. Replies: 9
    Last Post: 09-26-2012, 12:20 PM

Posting Permissions

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