I have table name TbleDailySales and Form name FrmSalesEntry and i have these fields in the table
[ReportDate], [EndingStick], [Amount] Reportdate is Key and date and EndingStick in number and amount is currency.
In the form I'm using Dlookup to bring the previous EndingStick and here is the codes
=Dlookup("[EndingStick]","TbleDailySales","[ReportDate]=Forms![FrmSalesEntry]![ReportDate]-1")
Sometimes I'm getting the previous day's record and sometimes nothing even when there is previous day in the table. Please help as these driving me crazy.
Thanks
[ReportDate], [EndingStick], [Amount] Reportdate is Key and date and EndingStick in number and amount is currency.
In the form I'm using Dlookup to bring the previous EndingStick and here is the codes
=Dlookup("[EndingStick]","TbleDailySales","[ReportDate]=Forms![FrmSalesEntry]![ReportDate]-1")
Sometimes I'm getting the previous day's record and sometimes nothing even when there is previous day in the table. Please help as these driving me crazy.
Thanks