when click "Search" with day on textbox [t1]>12 it run correct, but textbox [t1]=<12 is incorrect
(my computer using office 2003, format day : dd/mm/yyyy).
please help me!
Thank all!
when click "Search" with day on textbox [t1]>12 it run correct, but textbox [t1]=<12 is incorrect
(my computer using office 2003, format day : dd/mm/yyyy).
please help me!
Thank all!
Can't look at the sample, but it should be <=. You'd think it would work either way, but the <> needs to be first.
Access date standard is mm/dd/yyyy. dd/mm/yyyy is international (non-U.S.) structure. Review: http://allenbrowne.com/ser-36.html
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.
What you're trying to do with all those DSums can easily done in a query. Copy the following to the SQL View in your query design and run it.
You didn't have any code to populate dk so that is not included here.Code:SELECT ts.lnofcno, Sum(IIf([plgdt]=[MyDate] And [clholdcd]="N",[soluong],0)) AS Import, Sum(IIf([ngayxuat]=[MyDate] And [clholdcd]="X",[soluong],0)) AS Export, Sum(IIf([plgdt]<=[MyDate] And [clholdcd]="N",[soluong],0)) AS [End] FROM ts WHERE (((ts.plgdt)<=[MyDate]) AND ((ts.cltpcd)="[Bất động sản]")) OR (((ts.cltpcd)="[Bất động sản]") AND ((ts.ngayxuat)=[MyDate])) GROUP BY ts.lnofcno;
Ron
thank you very much!What you're trying to do with all those DSums can easily done in a query. Copy the following to the SQL View in your query design and run it.
You didn't have any code to populate dk so that is not included here.Code:SELECT ts.lnofcno, Sum(IIf([plgdt]=[MyDate] And [clholdcd]="N",[soluong],0)) AS Import, Sum(IIf([ngayxuat]=[MyDate] And [clholdcd]="X",[soluong],0)) AS Export, Sum(IIf([plgdt]<=[MyDate] And [clholdcd]="N",[soluong],0)) AS [End] FROM ts WHERE (((ts.plgdt)<=[MyDate]) AND ((ts.cltpcd)="[Bất động sản]")) OR (((ts.cltpcd)="[Bất động sản]") AND ((ts.ngayxuat)=[MyDate])) GROUP BY ts.lnofcno;
Ron