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" <(E-Mail Removed)> wrote in message
news:i3qg0p$ane$(E-Mail Removed)...
>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
>
|