If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Missing Operator Problem
Hi everybody,
i have an little Problem with an expression in my query. Im using the DSum(DomSumme in german) function to sum up=20 productionquantitys per month. The problem with that is=20 that DSum only should sum up the quantites ("St=FCckzahl")=20 of the last 12 month or 365 days ([Datum] means Date). I=20 made an expression but access needs an operator in the " &=20 ZDouble([Datum])=3D" & ZDouble([Datum])-365 criteria. I=20 don`t know which operator i got to use. Thanks for your help so far With best regards Benjamin My Expression: Mitarbeiterproduktion1: Wert(Nz(DomSumme ("St=FCckzahl";"Mitarbeiterproduktion";" & ZDouble([Datum]) =3D" & ZDouble([Datum])-365))) |
#2
|
|||
|
|||
Michel's already given you an answer that should work.
I just wanted to point out that Greater Than Or Equal To is =, not =. I suspect that was the cause of your error. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Benjamin" wrote in message ... Hi everybody, i have an little Problem with an expression in my query. Im using the DSum(DomSumme in german) function to sum up productionquantitys per month. The problem with that is that DSum only should sum up the quantites ("Stückzahl") of the last 12 month or 365 days ([Datum] means Date). I made an expression but access needs an operator in the " & ZDouble([Datum])=" & ZDouble([Datum])-365 criteria. I don`t know which operator i got to use. Thanks for your help so far With best regards Benjamin My Expression: Mitarbeiterproduktion1: Wert(Nz(DomSumme ("Stückzahl";"Mitarbeiterproduktion";" & ZDouble([Datum]) =" & ZDouble([Datum])-365))) |
#3
|
|||
|
|||
Hi,
DSum(("Stückzahl", "TableNameHere", "Date( ) - DatumField = 365 " ) Since the function Date( ) returns today date, Now( ) returns today with actual time, for info. The difference of two Date_value is in number of days, already (and decimal, for hours, such as 0.5 = 12 hours, half a day). Hoping it may help Vanderghast, Access MVP "Benjamin" wrote in message ... Hi everybody, i have an little Problem with an expression in my query. Im using the DSum(DomSumme in german) function to sum up productionquantitys per month. The problem with that is that DSum only should sum up the quantites ("Stückzahl") of the last 12 month or 365 days ([Datum] means Date). I made an expression but access needs an operator in the " & ZDouble([Datum])=" & ZDouble([Datum])-365 criteria. I don`t know which operator i got to use. Thanks for your help so far With best regards Benjamin My Expression: Mitarbeiterproduktion1: Wert(Nz(DomSumme ("Stückzahl";"Mitarbeiterproduktion";" & ZDouble([Datum]) =" & ZDouble([Datum])-365))) |
#4
|
|||
|
|||
Hi,
expression from Mr. Vandergast works well. Only a litte question on the Date() is it possible to replace Date() with an Field out of an query or table ? Thanks for all With best regards Benjamin |
#5
|
|||
|
|||
Assuming that the field is a Date field, there should be no problem.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Benjamin" wrote in message ... Hi, expression from Mr. Vandergast works well. Only a litte question on the Date() is it possible to replace Date() with an Field out of an query or table ? Thanks for all With best regards Benjamin |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Missing Data in an Outer Join | Noah | General Discussion | 1 | August 10th, 2004 04:16 PM |
Missing Office Patch Files | Ron Fairbrother | General Discussions | 0 | June 9th, 2004 06:59 PM |
Missing Library files | Jane | Using Forms | 1 | June 4th, 2004 02:54 AM |
Help with report...need to list if any info was missing from application. | Jacqueline | Setting Up & Running Reports | 2 | June 3rd, 2004 01:38 PM |
HELP - surface plots with missing data (How?) | Takeshi | Charts and Charting | 3 | March 11th, 2004 02:13 PM |