D
DS
I was wondering. Is the return of a null value covered.
Dim rs As DAO.Recordset
Dim rs2 As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"[MS Access;Database=\\Backoffice\C$\Warehouse\History.mdb].tblVoidDetails "
& _
"WHERE CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & _
"AND " & Format(Forms!frmReportDates!TxtEnd, "\#yyyy\-mm\-dd\#"),
dbOpenSnapshot)
Set rs2 = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"tblVoidDetails " & _
"WHERE CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & _
"AND " & Format(Forms!frmReportDates!TxtEnd, "\#yyyy\-mm\-dd\#"),
dbOpenSnapshot)
Me.TxtVoids = rs(0) + rs2(0)
rs.Close
rs2.Close
Does the rs(0) mean if it's null that it's 0?
Thanks
DS
Dim rs As DAO.Recordset
Dim rs2 As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"[MS Access;Database=\\Backoffice\C$\Warehouse\History.mdb].tblVoidDetails "
& _
"WHERE CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & _
"AND " & Format(Forms!frmReportDates!TxtEnd, "\#yyyy\-mm\-dd\#"),
dbOpenSnapshot)
Set rs2 = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"tblVoidDetails " & _
"WHERE CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & _
"AND " & Format(Forms!frmReportDates!TxtEnd, "\#yyyy\-mm\-dd\#"),
dbOpenSnapshot)
Me.TxtVoids = rs(0) + rs2(0)
rs.Close
rs2.Close
Does the rs(0) mean if it's null that it's 0?
Thanks
DS