Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    Ravenna, Ohio, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expression Builder (98)

    I am Wanting to enter rental history. With each release# there is a Item daily rental price, release date, and a return date. I want to create a formula that will subtract the release date from the return date, that will give me a total days and then multiple that time the daily rate.
    ItemTotalAmount: CCur([ReturnDate]-[ReleaseDate]*([Day]))
    I've even tried it with just SUM, ADS, and about everything I could think of.
    Could you please give me a hand, Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expression Builder (98)

    Hello MrJaums,

    Is Day the name of the daily rental price? If so, you may run into trouble, for Day is also a VBA function. Apart from that, the parentheses are not placed quite right. It should be

    ([ReturnDate]-[ReleaseDate])*[Day]

    I don't know if CCur is really needed here; if so, it becomes

    CCur(([ReturnDate]-[ReleaseDate])*[Day])

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Location
    Ravenna, Ohio, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expression Builder (98)

    It still Didn't work. I changed the Day to DailyRate and it didn't work still. Is there somewhere that explains the different Expression Functions better then what is at the bottom of the builder. Maybe I could make two different fields one to total the number of day past and another that takes the rate and times then days lapsed. I've tried even just trying to find total days and I'm having trouble with that too.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expression Builder (98)

    You haven't made clear what kind of trouble you have: do you get an error message, or do you see something like #Name or #Error instead of a value, or do you see different values than you expected?

  5. #5
    New Lounger
    Join Date
    Oct 2002
    Location
    Ravenna, Ohio, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Expression Builder (98)

    Sorry, #Error

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expression Builder (98)

    What happens if you enter

    Duration: [ReturnDate]-[ReleaseDate]

    in a column of the query grid?

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expression Builder (98)

    Discussion has continued in the thread starting with <post#=257354>post 257354</post#>. I'm locking this thread to avoid confusion and duplication.

Posting Permissions

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