|
-
Nov 8th, 2000, 05:18 PM
#1
Thread Starter
New Member
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
-
Nov 8th, 2000, 05:28 PM
#2
PowerPoster
???
I'm a little confused on your question, are you saying when you run your program, no records are shown??
dat.recordset.movefirst
-
Nov 8th, 2000, 05:57 PM
#3
Hyperactive Member
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]
-
Nov 8th, 2000, 06:47 PM
#4
Fanatic Member
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
Code:
With datcustomers.recordset
If Not .BOF Then .MovePrevious
End With
OK?
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|