This is a situation with many answers and the best one will be determined by what you are trying to accomplish.
If you are just trying to open a second form to the current record of your first form, then open the second form's recordset (query or SQL string) and add a criteria to the primary key field to filter the recordset.
Reference the primary key field on the first form:
Forms!frm1stForm!txtYourPKID
IF you are trying (not sure from your question) to keep the records in 2 forms synchronized, then using the same recordset.
Leave the second form's recordset blank and on its OnOpen event type:
Me.recordset = Forms!frm1stForm.recordset (substitute your object names)
If this isn't what you are looking for, then come back with more specifics.
Yes i am trying to open a second form to the current record of the first form. But im not sure how to go about adding a criteria to the primary key field to filter the recordset.
Any chance you could give a more detailed explanation.
This is the way I do this thing. If I understood your problem correctly. The problem with this is that when you open a the second form you only get this one record as the recordset. So you can't move to a different record in the second form.
Dim stDocName As String
Dim stLinkCriteria As String
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.