Ask Experts Questions for FREE Help !
Ask
    JoeMicro's Avatar
    JoeMicro Posts: 21, Reputation: 1
    New Member
     
    #1

    Aug 28, 2009, 01:32 PM
    Invalid date value in expression builder
    Hi,

    I want to sum a column on an unbound subform based on a txtbox on the main form, so I entered this
    Code:
    Sum(IIf([CheckDate]>=[Forms]![frmStatements]![txtDate] ,[Quantity],0))
    in a textbox on the subform but I get #Error in the txtbox.

    So I tried adding # so I get an error "the expression you entered has an invalid date value"?

    Any help would be appreciated.

    Joe
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Aug 28, 2009, 03:03 PM
    Try this as the ControlSource of the textbox:

    Code:
    =DSum("[Quantity]","tablename","[CheckDate] > #" & 
    Forms]![frmStatements]![txtDate] & "#")
    JoeMicro's Avatar
    JoeMicro Posts: 21, Reputation: 1
    New Member
     
    #3

    Aug 29, 2009, 09:54 PM
    Thanks Scott,

    I tried u'r solutions I changed "tablename" to my table name (and that's all I did) and I get the message "The expression you entered contains invalid syntax"

    The reason why I don't want to use "Dfunctions" is because its not being constantly updated as records are being entered in the subform unlike the sum iif function.

    Any other suggestions you could think of?

    Thank you again
    Joe.
    JoeMicro's Avatar
    JoeMicro Posts: 21, Reputation: 1
    New Member
     
    #4

    Sep 9, 2009, 07:11 PM
    Any ideas anybody?

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Own 8 lot s/div. Nr Nanaimo, because. Wish builder [ 1 Answers ]

First gated community in Cedar, just south of Nanaimo. First of its kind with u/g services, curbs gutter. There are 8 building lots ready for new house construction.

Website builder [ 5 Answers ]

So I'm just curious, I'm working on a project for my dad's company. It's a 1031 leverage, exchange stuff. Anyway my question, is where can I find someone to help creat a website for him. He has one made, but they want to totally revamp it, and they have to have a login page and what not. For...

Sued a Builder [ 2 Answers ]

In 2002 we sued a Builder due to the negligence on his part of not paying contractors and then taking all the money we had in the account for the construction draws. The bank was not to release the funds without our permission in which they did not care. We got a judgement against the builder, but...


View more questions Search