hondaman2003
Programmer
I know how to open a form with a button on a different form. How can I make the newly open for go to the previous record once it's open?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim rs As DAO.Recordset
Dim lngRID As Long
Set rs = Me.RecordsetClone
If Not IsNull(Me.OpenArgs) Then 'record is being edited
lngRID = CLng(Me.OpenArgs)
rs.FindFirst "RID = " & lngRID
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
End If
Else 'a new record is being created
DoCmd.GoToRecord , , acNewRec
End If
rs.Close
Set rs = Nothing