Results 1 to 2 of 2

Thread: add new record

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    34

    Question

    Hi, I'm new to VB so please be patient with me. In my contact members program I'm using the following code to keep records on Form1 and Form2 together,

    Private Sub datCocMembers_Reposition()
    frmFamily.datFamily.Recordset.MoveFirst
    Do Until frmFamily.datFamily.Recordset("MemberID") = datCocMembers.Recordset("MemberID")
    frmFamily.datFamily.Recordset.MoveNext
    Loop
    End Sub

    This works great except now when I go to AddNew record I get the following error message,

    Runtime 3021, no current record.

    My code to AddNew records is, data1.recordset.AddNew

    Please help,
    newvbr

  2. #2
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 1999
    Location
    South Africa
    Posts
    722
    I think it might be because you are using data1.recordset.addnew, but you have datFamily and datCocMembers.

    Try datFamily.Recordset.AddNew, or datCocFamily.Recordset.AddNew

    r0ach™
    Don't forget to rate the post

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