Dim db As Database
Dim rst As Recordset
Dim strSQL As String
Dim frn
Dim ton
frn = Forms![frmSLRePrintInvoices]![FromInvNo]
ton = Forms![frmSLRePrintInvoices]![ToInvNo]
strSQL = "SELECT SLInvoices.SLIPrinted, SLInvoices.SLINumber "
strSQL = strSQL & " From SLInvoices "
strSQL = strSQL & " WHERE (((SLInvoices.SLIPrinted)=True) AND ((SLInvoices.SLINumber) Between " & frn & " And " & ton & "))"
strSQL = strSQL & " ORDER BY SlInvoices.SLInumber;"
Set db = CurrentDb()
Set rst = db.OpenRecordset(strSQL, dbOpenDynaset)
The above piece of code gives the following error.
Run time error 6
OVERFLOW
Any Ideas
Thanks
Dim rst As Recordset
Dim strSQL As String
Dim frn
Dim ton
frn = Forms![frmSLRePrintInvoices]![FromInvNo]
ton = Forms![frmSLRePrintInvoices]![ToInvNo]
strSQL = "SELECT SLInvoices.SLIPrinted, SLInvoices.SLINumber "
strSQL = strSQL & " From SLInvoices "
strSQL = strSQL & " WHERE (((SLInvoices.SLIPrinted)=True) AND ((SLInvoices.SLINumber) Between " & frn & " And " & ton & "))"
strSQL = strSQL & " ORDER BY SlInvoices.SLInumber;"
Set db = CurrentDb()
Set rst = db.OpenRecordset(strSQL, dbOpenDynaset)
The above piece of code gives the following error.
Run time error 6
OVERFLOW
Any Ideas
Thanks