Click to See Complete Forum and Search --> : no current records!
aknighter
Nov 8th, 2000, 04:18 PM
HELP!
When I am at the start of the recordset using a datasource and use the code:
datCustomers.Recordset.MovePrevious
I get an error "No current record" because it doesn't recognize that that is the start of the data. Is there any way to get around this.
Aknighter
Lethal
Nov 8th, 2000, 04:28 PM
I'm a little confused on your question, are you saying when you run your program, no records are shown??
dat.recordset.movefirst
barrk
Nov 8th, 2000, 04:57 PM
try this:
if not (datcustomers.recordset.bof and dat.recordset.eof)then
datCustomers.Recordset.MovePrevious
end if
[Edited by barrk on 11-08-2000 at 06:16 PM]
paulw
Nov 8th, 2000, 05:47 PM
All you need to test for is .BOF (beginning of file), it can only be .BOF and .EOF if there are no records.
if not (datcustomers.recordset.bof and dat.recordset.eof)then
this will execute if there are any records - so you could still move past the first record. Simply use
With datcustomers.recordset
If Not .BOF Then .MovePrevious
End With
OK?
Paul.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.