spartansFC
Programmer
Hi
I have a continuous form on a unbound main form and a command button that opens up
to record based off the continuous form.
the subform
is bound to
the code to open
the on open event of frmFamilyCentre is
the problem is the frmFamilyCentre only opens up to the first record, i'm not sure why it's not opening up to the correct record as the openargs
is showing the correct lngPeopleID.
Anyone have any ideas
Michael
I have a continuous form on a unbound main form and a command button that opens up
Code:
frmFamilyCentre
the subform
Code:
frmChildList2
Code:
qryChildList
Code:
Private Sub UpdateFamily_cmdbutton_Click()
On Error GoTo Err_UpdateFamily_cmdbutton_lest_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmFamilyCentre"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me!frmChildList2.Form!lngPeopleID
Exit_UpdateFamily_cmdbutton_lest_Click:
Exit Sub
Err_UpdateFamily_cmdbutton_lest_Click:
MsgBox Err.Description
Resume Exit_UpdateFamily_cmdbutton_lest_Click
End Sub
Code:
Private Sub Form_Open(Cancel As Integer)
MsgBox Me.OpenArgs
If Len(Me.OpenArgs) > 0 Then
Dim rs As Object
Set rs = Me.frmFamilyCentreSub1AddNewFamily.Form.Recordset.Clone
rs.FindFirst "[lngPeopleID]=" & Me.OpenArgs
If Not rs.EOF Then Me.frmFamilyCentreSub1AddNewFamily.Form.Bookmark = rs.Bookmark
End If
End Sub
the problem is the frmFamilyCentre only opens up to the first record, i'm not sure why it's not opening up to the correct record as the openargs
Code:
MsgBox Me.OpenArgs
Anyone have any ideas
Michael