I have the following code but it does not work correctly.
DoCmd.GoToRecord , , acGoTo, MySubForm.Form.CurrentRecord
When the code executes it does not bring me to the correct record. If
MySubForm.Form.CurrentRecord is 1 it brings me to the 4 record not the
15th which are different due to deletions. Is there any way to get it
to the correct record?
Thanks
ken - 17 Dec 2005 14:58 GMT
I should add that the subform is filtered with a master/child property.
That's why the CurrentRecord is incorrect. I was wondering what I could
use to get the actuall record in the subform. So
MySubForm.Form.CurrentRecord = 1 maybe record 26 in the subform's
recordset.
pietlinden@hotmail.com - 20 Dec 2005 23:14 GMT
Ken,
I'm confused. From your description, it sounds like you're using an
Autonumber as the unique ID for your child records. Say you have 25
records total in your child table. If you delete some of them, you'll
have gaps in your record sequence. That's normal. Autonumbers are for
*uniqueness only*. The ID numbers do not reuse any numbers, so they'll
just keep going up (if you set the nextvalue or whatever to Increment
instead of Random. (Sorry, I'm sort of thinking in Oracle).
"Correct" record. Hmm... are there missing records that are supposed
to be there? Or are they just numbered in a way other than you expect?
Data in tables are inherently unordered. It's like a pile of index
cards. Unless you sort them specifically, they're not in any
guaranteed order at all. That's just the way a database works - kind
of like buckets of records.