Dreamweaver
Well-known member
- Local time
- Today, 08:40
- Joined
- Nov 28, 2005
- Messages
- 2,466
this works but the record is set as the first record regardless of the sort order
So I tried This
I I get a can't goto record Error
In Picture form I select the record found as below
When the recording form opens It moves the subform so the record I want it in the subform window as below (Circled)
Code:
Dim R As DAO.Recordset
On Error GoTo HandleErr
If Not IsNothing(Me.OpenArgs) Then
Set R = Me.Sub_ZfrmTracks.Form.RecordsetClone
R.FindFirst "[TrackID] = " & Me.OpenArgs
Me.Sub_ZfrmTracks.Form.Bookmark = R.Bookmark
End If
HandleExit:
Exit Sub
HandleErr:
Select Case Err.Number
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
Resume HandleExit
Resume
End Select
So I tried This
Code:
Dim R As DAO.Recordset
On Error GoTo HandleErr
If Not IsNothing(Me.OpenArgs) Then
Me.Sub_ZfrmTracks.SetFocus
DoCmd.GoToRecord , , acGoTo, Me.OpenArgs
End If
HandleExit:
Exit Sub
HandleErr:
Select Case Err.Number
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
Resume HandleExit
Resume
End Select
I I get a can't goto record Error
In Picture form I select the record found as below
When the recording form opens It moves the subform so the record I want it in the subform window as below (Circled)