In the database I have problem in showing the added data to the form that is in navigation form.
I have used the following code in the after update event of frmAddNew
Private Sub Form_AfterUpdate()
Dim lngSNO As Long
Dim frm As Form
Dim rs As DAO.Recordset
If IsFormLoaded("frmCargoSearch") Then
Set frm = Forms("frmCargoSearch")("tblCargoMaster subform").Form
lngSNO = frm!Sno
frm.Requery
Set rs = frm.RecordsetClone
rs.FindFirst "[sno] = " & lngSNO
If Not rs.NoMatch Then frm.Bookmark = rs.Bookmark
rs.Close
Set rs = Nothing
Set frm = Nothing
End If
End Sub
When try to add in frm search it works but in navigation form it doesn’t.
Need your help to overcome this
Thank you
foxtet
I have used the following code in the after update event of frmAddNew
Private Sub Form_AfterUpdate()
Dim lngSNO As Long
Dim frm As Form
Dim rs As DAO.Recordset
If IsFormLoaded("frmCargoSearch") Then
Set frm = Forms("frmCargoSearch")("tblCargoMaster subform").Form
lngSNO = frm!Sno
frm.Requery
Set rs = frm.RecordsetClone
rs.FindFirst "[sno] = " & lngSNO
If Not rs.NoMatch Then frm.Bookmark = rs.Bookmark
rs.Close
Set rs = Nothing
Set frm = Nothing
End If
End Sub
When try to add in frm search it works but in navigation form it doesn’t.
Need your help to overcome this
Thank you
foxtet