View Full Version : end of recordset
Pirate 06-16-2009, 08:03 PM G'Day ,
I'm using a macro to open a form and when asked to start on a new record it gives the message "You can't go to specified record you may be at the end of the recordset". When set to open on first or last record it works fine.
I am fairly new to Access 2007 (and any other Access) so would like some help please.
Thanks
Steve
pbaldy 06-16-2009, 08:09 PM My first guess would be that the source of the form does not allow additions. Can you add records to it outside the form?
Pirate 06-16-2009, 09:34 PM G'Day Paul,
It is possible to add a new record or edit an old record direct into the table.
Steve
pbaldy 06-17-2009, 07:02 AM And is the form based directly on the table, or on a query? If a query, can it be added to or edited?
Also, if you are on a new record you can't use a macro or code to go to a new record because you are already there. So, the VBA code would actually be:
If Not Me.NewRecord Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
that way it will only use code to go to a new record IF it isn't already on one.
Pirate 06-17-2009, 02:25 PM The form is based on a Query, and I can not edit it, or add new record.
The form is not open or on a new record :confused:
The form is based on a Query, and I can not edit it, or add new record.
The form is not open or on a new record :confused:
Your recordset is not updateable then and here's a list (http://allenbrowne.com/ser-61.html) of what can cause that.
Pirate 06-17-2009, 03:35 PM Thanks, Checked the list but none of them seem to be the cause (as far as my limited knowledge goes). However on the properties list for the form "Data entry" was set to "No" I changed to "yes" but when the form opened the form was completly blank (no fields, nothing) I feel a bit lost!:confused::confused:
Thanks, Checked the list but none of them seem to be the cause (as far as my limited knowledge goes). However on the properties list for the form "Data entry" was set to "No" I changed to "yes" but when the form opened the form was completly blank (no fields, nothing) I feel a bit lost!:confused::confused:
Data Entry does not do what you think it does. It just opens a clean form for entering data (you don't get to see previously entered records).
Make sure the AllowAdditions is set to YES.
Pirate 06-17-2009, 03:52 PM I checked the property Make sure the AllowAdditions is set to "Yes" and it is. Should I remake the Query and Form?
I checked the property Make sure the AllowAdditions is set to "Yes" and it is. Should I remake the Query and Form?
Could be worth a try. If possible, maybe post the current one here.
Pirate 06-17-2009, 04:19 PM OK, how do I post the form and the query here?
OK, how do I post the form and the query here?
How to post the database (http://www.access-programmers.co.uk/forums/showthread.php?t=140587) to the forum.
Pirate 06-25-2009, 04:39 AM Thanks For your help, ended up remaking the query and the problem went away.Could not up load database compressed file to large.
Pirate 06-25-2009, 04:44 AM Thanks For your help, ended up remaking the query and the problem went away.Could not up load database compressed file to large.
|