• Formula

    Author
    Topic
    #462125

    I have a calculated field, ExtraKP, in a qryRentCalc0

    I am trying to make a tax calculation when two conditions are met:
    1. When [PState] = “SC”
    2. When [RentPaidDate] is after 06/30/2007.

    My formula is as follows
    ExtraKP: IIf([RentPaidDate] > #06/30/2007# and [PState]= “SC”,[NonRoomTaxable]*0.01,0)

    I have a situation where
    RentPaidDate = 06/01/07
    PState= “SC”
    NonRoomTaxable = $40.00

    The formula is returning $0.40

    Since the RentPaidDate is earlier than 06/30/07, it should return 0

    What am I doing wrong?

    Tom

    Viewing 1 reply thread
    Author
    Replies
    • #1175129

      Is the RentPaidDate a Date/Time field?

    • #1175133

      Perhaps RentPaidDate has been entered as 06/01/2107 by accident?

      • #1175134

        I verified that the date in the formula is #06/30/2007# and RentPaidDate is in fact 06/01/2007.

        RentPaidDate is a field in tblRental
        Date/Time
        Short Date
        99/99/00;0;_

        Tom

        Perhaps RentPaidDate has been entered as 06/01/2107 by accident?

        • #1175139

          I don’t think we can solve this without seeing (a stripped down copy of) the actual database.

          • #1175155

            Many tanks for the assistance. The formula turned out to be working correctly. The problem was in another field which was adding the tax amount in which made it look like the formula was not working.

            Tom

            I don’t think we can solve this without seeing (a stripped down copy of) the actual database.

            • #1175156

              Glad you found it (this would have been impossible to discover without seeing the database).

    Viewing 1 reply thread
    Reply To: Formula

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: