Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

real record in a subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ken - 17 Dec 2005 14:41 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.