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

    After Update

    Hello everybody,

    I do have a Form and Subform in which payments for products are entered. The Main Form contains among other fields, a field, 'ProductValue'. The Subform contains two fields, PaymentDt and PaymentAmount. Payments for a product is made either one time or on several dates. On entering the payments, if the payment exceeds the product value, a warning message should appear. I tried the following in the after update event of PaymentAmount:

    If Sum([Me.PaymentAmount]) > Me.Parent.ProductValue Then
    MsgBox "Payment exceeds the total payable for the Product, " & Me.Parent.ProductValue, vbCritical + "CAUTION! PAYMENT EXCEEDS PRODUCT VALUE!"
    End If

    However the function is not working.

    Please let me know what mistake I have committed.



    Regards,
    Alex

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Why not use a MsgBox in the AfterUpdate event to display the value of "Sum([Me.PaymentAmount])" and see what is going on?

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Not sure what you are doing with the Sum function, Please explain that! However, try this!


    If Me.PaymentAmount > Me.Parent.ProductValue Then
    Call MsgBox("Payment exceeds the total payable for the Product", vbCritical, Application.Name)
    End If
    HTH

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

Similar Threads

  1. Replies: 14
    Last Post: 08-12-2014, 06:33 AM
  2. Replies: 7
    Last Post: 08-26-2013, 06:05 AM
  3. Replies: 2
    Last Post: 08-30-2012, 07:59 AM
  4. Replies: 4
    Last Post: 11-10-2011, 03:41 PM
  5. Replies: 1
    Last Post: 01-22-2011, 12:23 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
  •  
Other Forums: Microsoft Office Forums