main form shows record selected within datasheet subform

Callum

Registered User.
Local time
Yesterday, 17:36
Joined
Jul 15, 2011
Messages
14
Hi guys,

searched around for awhile with this one but none of the 'solutions' seemed to work for me,

the situation is i have two forms, looking at the same table, but the main table shows more records, i would like to select a record in the datasheet subform and have the main form flick through to the corresponding record,

any help would be appreciated,

thanks,
callum
 
I think the following code will do what you want if placed in an event in the sub form:
Code:
    Dim rs As Object

    Set rs = Parent.Recordset.Clone
    rs.FindFirst "[ID] = " & Str(Nz(Me![ID], 0))
    If Not rs.EOF Then Parent.Bookmark = rs.Bookmark
BUT, I don't understand why you would have a main form and sub form showing the same data. I assume that the "Link Child Fields" and "Link Master Fields" properties of the sub form are blank.
 
That's called a Split Form, and is available, if you running Access 2007 or later, by going to Properties - Format and setting Default View Property to Split Form. This works exactly as you've described.

Linq ;0)>
 
Last edited:
That's called a Split Form, and is available, if you running Access 2003 or later, by going to Properties - Format and setting Default View Property to Split Form. This works exactly as you've described.

Linq ;0)>
I don't think that feature is available in A2003.:confused:
 
You're right, of course! Worked with 2003 for so long (until 2012) I sometimes get confused! :D

Thanks for catching it! I hate disseminating bad info!

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom