Results 1 to 4 of 4

Thread: adding records to an empty table error message

  1. #1
    Guest

    Post

    i have a table with no records.
    when i add the records the first
    one gives me an error of no current
    record...

    how can i avoid this?

  2. #2
    Guest

    Post

    this is the code i have used...

    i have one textbox that accepts a number, so upon pressing enter these next steps take place writing to a table. however, it doesn't work correctly after the second entry.

    While Not rs.EOF
    rs.MoveNext
    rs.AddNew
    rs("Invoice_Date") = Me.txtDate
    rs("Order_No") = Me.txtOrdNo
    rs("Date_Scanned") = FormatNow, "yyyymmdd")
    rs("Time_Scanned") = Format(Now, "hhnnss")
    rs.Update
    Wend


  3. #3
    Lively Member
    Join Date
    Jan 1999
    Posts
    82

    Post

    Hi,

    DO NOT RS.MOVENEXT. This causes your table pointer to move to the next record when there is not even a first record.

    HTH,

    Preeti

  4. #4
    Lively Member
    Join Date
    Jan 1999
    Posts
    82

    Post

    Hi,

    DO NOT RS.MOVENEXT. This causes your table pointer to move to the next record when there is not even a first record.

    HTH,

    Preeti

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