create a form that contains the recordsource that you want to display, add the required fields to the detail section (ensure that you include one that has a key field(s) that identify the record), then add code similar to the following, to each control that you want the user to be able to click in (I'd use double-click) which will open your Data entry form and send a value to the OpenArgs property of the Form.
Then in your Data Entry form add code similar to the Form's On Load Event, which searches the recordset for the data and moves to the correct record.
Private Sub Form_Load()
If Me.OpenArgs <> "" Then
With Me.RecordsetClone
'this expects a numeric value, if yours is Text
'be sure to add delimiters
.FindFirst "TheKeyFieldName = " & Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End With
End If
End Sub
To open the form that you want to view in Datasheet, you do that in the OpenForm Action
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.