Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2011

    Unanswered: Subform total not matching parent total

    On my mainform (events) I have three fields - cost, gst and total. The following code is entered for cost:
    Private Sub Cost_AfterUpdate()
    Me.GST = Me.Cost * 0.15
    Me.Total = Me.Cost * 1.15
    End Sub
    On my subform (participants) I am trying to refer to the when there is an entry in the "registrant" field. I have the following code on my subform
    Private Sub Registrant_AfterUpdate
    Me.Event_Total_Cost = Me.Parent.Total
    The problem that I am encountering is that the subform seems to be only entering the number as an interger - it either rounds up or rounds down. I have created the fields as number in currency format (on both forms) with auto decimal places. How can I ensure that the numbers show up appropriately?

  2. #2
    Join Date
    Apr 2011
    Wait - found one of the fields was not the same data type (it was number). All is good.

  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    And the Default Field Size for a Number Datatype is Long Integer, which is why everything was being rounded to whole numbers!

    It's always nice when you can solve the problem yourself!

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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