Results 1 to 4 of 4

Thread: no current records!

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    15

    Angry

    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



  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496

    ???

    I'm a little confused on your question, are you saying when you run your program, no records are shown??

    dat.recordset.movefirst


  3. #3
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274
    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]

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    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
  •  



Click Here to Expand Forum to Full Width