Unanswered: Does anyone use the fsubnavigation tool supplied by Access 2002 Handbook?
Is anyone familiar with the fsubnavigation tool supplied by Access 2002 Desktop Developer's Handbook by Litwin, Getz, and Gunderloy.
I would like to use it in my form, but I do not completely understand how to connect it to the mainform correctly.
I added the subform to the mainform. But as soon as the sub form is loaded, the following code is immediately executed. I have not accessed the recordset of the mainform and am getting (3021, "No Current Record") from within the subform code. Any guidance is very much appreciated.
Why does the subform immediately execute?
Private Sub Form_Load()
mblnIsSubform = IsSubForm(Me)
If mblnIsSubform Then
Set frmMain = Me.Parent
' Code won't run unless the words
' "[Event Procedure]" show up in the
' main form's event properties.
frmMain.OnCurrent = "[Event Procedure]"
frmMain.OnDirty = "[Event Procedure]"
frmMain.OnUndo = "[Event Procedure]"
' Calculate the total number of records?
If adhcCalcTotalRecs Then
Dim rst As DAO.Recordset
Set rst = frmMain.RecordsetClone
txtTotalRecs = rst.RecordCount
Set rst = Nothing