Open form, go to record on subform

  • Thread starter Bradley C. Hammerstrom
  • Start date
B

Bradley C. Hammerstrom

Access2000

This works fine to open a form and then go to the record with the same
PhotoID as the calling form. (OpenArgs is set in the OnClick Event of the
command button.)
*****************
'GoTo same record as frmPhotosPerObs
Private Sub Form_Load()
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst "PhotoID = " & Me.OpenArgs
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
End If
End Sub
*****************
Now I want to do a similar thing, only the form I want to open has a subform
and I want to go the matching record on the subform. How do I change the
..FindFirst line to refer to the subform's PhotoID?

Brad H.
 
B

Bradley C. Hammerstrom

It seems like you would need two OpenArgs; one to goto the correct parent
record, and then (after moving the focus to the subform) another to goto the
correct child record. Can two OpenArgs statments be "remembered" from the
DoCmd that calls the form?

Brad H.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top