VBANewBie :)
Member
- Local time
- Today, 23:51
- Joined
- Apr 14, 2021
- Messages
- 88
Hello Guys , I have a problem with Query Result in the attached database.
Short Version :
I need the query named Result to sum the QtyOut from QrySales Like the Following hypothetical Dsum
Which means i need query Result to show all the records from QryPlans and only the records from QrySales where the joined fields are equal ("Code","Client") And Where the Zdate From QrySales Between ClcFromDate And ClcToDate (Which are mentioned besides PlanSerial in QryPlans).
Long Version :
I already tried to make it happen by using parameter in date :
and join query result with other queries and it works fine in some cases like if there are sales in the period between ClcFromDate To ClcToDate then it works fine and Sum as supposed but , If the sales date not in the period between ClcFromDate To ClcToDate then the query result hides the entire row due to the previous mentioned parameter.
Hope i could explain more , Thanks in Advance
Short Version :
I need the query named Result to sum the QtyOut from QrySales Like the Following hypothetical Dsum
Code:
QryResult.[QtySold] = Dsum("[QtyOut]","QrySalesPlans","[Code]='"&[ProductCode]&'" And [Client]='"&[Client]&'" And [Zdate] Between #QryFollowUpPlans.[ClcFromDate]# And #QryFollowUpPlans.[ClcToDate]#
Which means i need query Result to show all the records from QryPlans and only the records from QrySales where the joined fields are equal ("Code","Client") And Where the Zdate From QrySales Between ClcFromDate And ClcToDate (Which are mentioned besides PlanSerial in QryPlans).
Long Version :
I already tried to make it happen by using parameter in date :
SQL:
Between [ClcFromDate] And [ClcToDate] Or Is Null
Hope i could explain more , Thanks in Advance
Attachments
Last edited: