Can't go to new record

Discussion in 'Microsoft Access Getting Started' started by LAS, Aug 10, 2010.

  1. LAS

    LAS Guest

    I have a routine that adds a new record, either when the parameters retrieve
    no record (works fine) or when the user clicks an "add button." In that
    case I can see that a new set of empty fields show up in my form. I can
    scroll to them, but if I try to enter data into any of the fields the
    pre-existing populated record pips into place (Only one row can be seen at a
    time on the form.) I tried to remedy this by adding the "goto record"
    statement. That produced "Can't go to specified record." I found some
    stuff on the web about the "before update" event not having completed. I
    tried adding .update.

    Note, unless it is the real reason for my problem, please don't focus on my
    use of recordsets instead of form controls. I have a large, complex
    application, am under some time pressure, and will explore that when I have
    more space (referring here to other threads in forms and forms coding.)

    If irst_StudentTracking.RecordCount > 0 Then
    irst_StudentTracking.Edit
    irst_StudentTracking.Update
    End If
    Me.AllowAdditions = True
    irst_StudentTracking.AddNew
    DoCmd.GoToRecord , , acNewRec
    irst_StudentTracking!Student_ID = cboStudent_ID

    TIA
    LAS
     
    LAS, Aug 10, 2010
    #1
    1. Advertisements

  2. LAS

    LAS Guest

    I just re-read David Fenton's reply to my post "Me.Recordset vs a variable"
    in "forms coding." At the time I didn't have a particular problem, so I
    didn't notice the part about "your problem with a new record." About 8
    hours later I discovered I did have this problem with a new record. He said
    my new record problems would go away if I used the Me! syntax for controls
    and fields. I am engaged in doing that. Please consider this posting null
    and void, as the behavior is changing. This particular problem has gone
    away. I'm still having problems, but will re-post.

    "LAS" <> wrote in message
    news:i3qg0p$ane$-september.org...
    >I have a routine that adds a new record, either when the parameters
    >retrieve no record (works fine) or when the user clicks an "add button."
    >In that case I can see that a new set of empty fields show up in my form.
    >I can scroll to them, but if I try to enter data into any of the fields the
    >pre-existing populated record pips into place (Only one row can be seen at
    >a time on the form.) I tried to remedy this by adding the "goto record"
    >statement. That produced "Can't go to specified record." I found some
    >stuff on the web about the "before update" event not having completed. I
    >tried adding .update.
    >
    > Note, unless it is the real reason for my problem, please don't focus on
    > my use of recordsets instead of form controls. I have a large, complex
    > application, am under some time pressure, and will explore that when I
    > have more space (referring here to other threads in forms and forms
    > coding.)
    >
    > If irst_StudentTracking.RecordCount > 0 Then
    > irst_StudentTracking.Edit
    > irst_StudentTracking.Update
    > End If
    > Me.AllowAdditions = True
    > irst_StudentTracking.AddNew
    > DoCmd.GoToRecord , , acNewRec
    > irst_StudentTracking!Student_ID = cboStudent_ID
    >
    > TIA
    > LAS
    >
     
    LAS, Aug 10, 2010
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kostika

    Access 2000 - Hidden record counter and open to new record

    Kostika, Aug 18, 2004, in forum: Microsoft Access Getting Started
    Replies:
    5
    Views:
    737
    Kostika
    Aug 23, 2004
  2. Guest

    please help... can't add new record in form... 2nd record changes

    Guest, May 28, 2005, in forum: Microsoft Access Getting Started
    Replies:
    5
    Views:
    220
    MacDermott
    May 29, 2005
  3. Jack Sheet
    Replies:
    4
    Views:
    269
    Jack Sheet
    Nov 9, 2005
  4. Guest

    Record # to come up automatically with a new record

    Guest, Dec 27, 2005, in forum: Microsoft Access Getting Started
    Replies:
    3
    Views:
    169
    John Vinson
    Dec 28, 2005
  5. Guest

    how do i sum a record and the record above it. in a new field?

    Guest, Mar 10, 2006, in forum: Microsoft Access Getting Started
    Replies:
    2
    Views:
    221
    Guest
    Mar 10, 2006
Loading...

Share This Page