Can anyone tell me what is wrong with this formula below?
Usage: IIf(([GTORSH]![PITEM]=[tbl_Inventory]![Item#]) And ([GTORSH]![PSHPDT]>=[BeginDate]) And ([GTORSH]![PSHPDT]<=[EndDate]),Sum([GTORSH]![PSHQTY]),0)
Can anyone tell me what is wrong with this formula below?
Usage: IIf(([GTORSH]![PITEM]=[tbl_Inventory]![Item#]) And ([GTORSH]![PSHPDT]>=[BeginDate]) And ([GTORSH]![PSHPDT]<=[EndDate]),Sum([GTORSH]![PSHQTY]),0)
Usage: Sum(IIf([GTORSH]![PITEM]=[tbl_Inventory]![Item#] And ([GTORSH]![PSHPDT] Between [BeginDate] And [EndDate],[GTORSH]![PSHQTY],0))
How are BeginDate and EndDate values captured?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
[BeginDate] And [EndDate] will be entered as parameter values when the query runs.
Okay, is my suggestion working?
I don't use input parameter prompts, can't validate. I have users enter values on form and refer to the controls on form for input parameters.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thx a million June7.
I had to modify your suggestion only a little bit: Usage: Sum(IIf([GTORSH]![PITEM]=[tbl_Inventory]![Item#] And ([GTORSH]![PSHPDT]>=[BeginDate]) And ([GTORSH]![PSHPDT]<=[EndDate]),[GTORSH]![PSHQTY],0))