ISAM Error

D

DS

I'm running this code and I'm getting an ISAM error. 3170

Set RS = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"[MSAccess;Database=\\Backoffice\C$\Warehouse\History.mdb].tblDiscountDetails
" & _
"WHERE (CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & " AND " & Format(Forms!frmReportDates!TxtEnd,
"\#yyyy\-mm\-dd\#") & ") AND CDDiscountManID = " & Me.EmployeeID,
dbOpenSnapshot)

Me.TxtDiscounts = Nz(RS(0), 0)
RS.Close

I'm using XP Pro 2002 Service Pack 2
And Access 2002 Service Pack 3

Thanks
DS
 
D

Douglas J. Steele

Try removing the MSAccess, and just using

Set RS = CurrentDb.OpenRecordset("SELECT Count(*) FROM " & _
"[;Database=\\Backoffice\C$\Warehouse\History.mdb].tblDiscountDetails
" & _
"WHERE (CDBizDay BETWEEN " & Format(Forms!frmReportDates!TxtStart,
"\#yyyy\-mm\-dd\#") & " AND " & Format(Forms!frmReportDates!TxtEnd,
"\#yyyy\-mm\-dd\#") & ") AND CDDiscountManID = " & Me.EmployeeID,
dbOpenSnapshot)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Syntax Error 4
Are Nulls Covered? 2
Not returning a value 7
Criteria Mismatch 4
DCount In Otherdb 27
DCount Syntax 2
From External Database 5
UNION SELECT Problem 2

Top