By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,566 Members | 1,779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,566 IT Pros & Developers. It's quick & easy.

real record in a subform

P: n/a
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?


Dec 17 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
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

Dec 17 '05 #2

P: n/a
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.

Dec 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.