PC Review


Reply
Thread Tools Rate Thread

Can't go to new record

 
 
LAS
Guest
Posts: n/a
 
      10th Aug 2010
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


 
Reply With Quote
 
 
 
 
LAS
Guest
Posts: n/a
 
      10th Aug 2010
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)-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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Record in query, save as New Record then edit New Record spreadsheetlady Microsoft Access 1 26th Jan 2010 10:41 PM
adding a new record at subform should update an existing record (not create new record) Mark Kubicki Microsoft Access Form Coding 1 16th Jan 2009 09:34 AM
Current Record Count, Previous Record #, Add New Record =?Utf-8?B?Um9iZXJ0IE51c3ogQCBEUFM=?= Microsoft Access Forms 0 15th Feb 2005 09:35 PM
New record button that auto places cursor in 1st text box of new record Peter Microsoft Access Macros 1 5th Feb 2004 03:43 AM
I am trying to get a form to pick up the record data from a different record to this new record Thomas Simsion Microsoft Access Forms 4 10th Nov 2003 10:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:28 AM.