![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The SQL string returns 4 records if pasted into a QBE grid and run manually. But in this DAO setting, I can't seem to get it to retrun any records. When line #340 executes, error tells me No Current Record. Ideas? 160 PString = "SELECT tblVehicleJobs.VehicleJobID, tblVehicleJobs.ProcFee, tblVehicleJobs.VehicActive, tblVehicleJobs.BilledOut FROM tblVehicleJobs " 180 PString = PString & "WHERE tblVehicleJobs.BilledOut=False AND GetPortionPaid([VehicleJobID]>=[ProcFee]) AND tblVehicleJobs.VehicActive=True" 240 Dim DB As Database, Rst As Recordset, QD As QueryDef 260 Set DB = CurrentDb 280 Set QD = DB.CreateQueryDef("", PString) 300 Set Rst = QD.OpenRecordset(dbOpenDynaset) 340 Rst.MoveFirst |
#3
| |||
| |||
|
|
DAO.Recordset |
#4
| |||
| |||
|
|
The SQL string returns 4 records if pasted into a QBE grid and run manually. But in this DAO setting, I can't seem to get it to retrun any records. When line #340 executes, error tells me No Current Record. Ideas? 160 PString = "SELECT tblVehicleJobs.VehicleJobID, tblVehicleJobs.ProcFee, tblVehicleJobs.VehicActive, tblVehicleJobs.BilledOut FROM tblVehicleJobs " 180 PString = PString & "WHERE tblVehicleJobs.BilledOut=False AND GetPortionPaid([VehicleJobID]>=[ProcFee]) AND tblVehicleJobs.VehicActive=True" 240 Dim DB As Database, Rst As Recordset, QD As QueryDef 260 Set DB = CurrentDb 280 Set QD = DB.CreateQueryDef("", PString) 300 Set Rst = QD.OpenRecordset(dbOpenDynaset) 340 Rst.MoveFirst |
#5
| |||
| |||
|
|
On Wed, 23 Jan 2008 07:50:04 -0800, "Fred Zuckerman" ZuckermanF (AT) sbcglobal (DOT) net> wrote: DAO.Recordset |
|
"MLH" <CRCI (AT) NorthState (DOT) net> wrote in message news:9ioep3polan0n4se46m498ai6sjhiilc29 (AT) 4ax (DOT) com... Yep, I've seen the DAO.Recordset thing before. Why is it better to declare it that way - as opposed to simply declaring it AS RecordSet? Oh, and BTW, the SQL string had a misplaced parentheses that was causing my screw-up. |
#6
| |||
| |||
|
|
GetPortionPaid([VehicleJobID]>=[ProcFee]) |
#7
| |||
| |||
|
|
Yep, I've seen the DAO.Recordset thing before. Why is it better to declare it that way - as opposed to simply declaring it AS RecordSet? |
|
Oh, and BTW, the SQL string had a misplaced parentheses that was causing my screw-up. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx On Wed, 23 Jan 2008 07:50:04 -0800, "Fred Zuckerman" ZuckermanF (AT) sbcglobal (DOT) net> wrote: DAO.Recordset |
![]() |
| Thread Tools | |
| Display Modes | |
| |