Results 1 to 5 of 5

Thread: Appending a database -- Says EOF reached, and cant add

  1. #1

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Appending a database -- Says EOF reached, and cant add

    Using Access 2002 - VBA

    How could I add a new record in the table in my database? I want to input information from a form, but it doesnt have enough rows to handle the information.


    It keeps saying file is at EOF or BOF.
    Last edited by kfcSmitty; May 27th, 2005 at 11:42 AM.

  2. #2

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Fix me!! You know you want to

    *edit*

    just look at above post, all over problems have been fixed
    Last edited by kfcSmitty; May 27th, 2005 at 11:35 AM.

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Fix me!! You know you want to

    Why even issue a MoveFirst? When a recordset is opened, it is always at the first record unless there are no records (obviously). But if you insist, just make sure there are records in the recordset.

    VB Code:
    1. RsStorage.Open "Splits", cn, adOpenKeyset, adLockPessimistic, adCmdTable
    2.     If Not (rsStorage.BOF And rsStorage.EOF) Then 'ie the table is empty
    3.        RsStorage.MoveFirst
    4.     End If

  4. #4

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Fix me!! You know you want to

    *edit* just look at the first post -- everything else has been solved
    Last edited by kfcSmitty; May 27th, 2005 at 11:36 AM.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Appending a database -- Says EOF reached, and cant add

    EOF or BOF is not an issue that should matter if you are adding a record.

    Post your code so we can see the problem.

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