Form / Subform / Subform calling problem.

IfButOnly

Registered User.
Local time
Today, 21:09
Joined
Sep 3, 2002
Messages
236
I picked up a tip from the Stephen Leban's website where if you have a number of forms you put custom navigation buttons into a subform on each of the forms - this works great, gives conformity and cuts down on the code.

The code in the Nav Button subform is as below:

------------------------------
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click

DoCmd.GoToRecord acDataForm, Me.Parent.Name, acNext

Exit_cmdNext_Click:
Exit Sub

Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click

End Sub
--------------------------------------

Now the problem....

I have a main form and a subform. An item on the main form is clicked and populates the subform with the selected unbound form. On the subform you can navigate through the records for that particular table.

I have been trying for ages to get this going by changing the object name in the Navigation sub-subform (from Me.Parent.Name) so that it works on the subform but with no luck - if the syntax is correct, I generally get the message that the object name is not open.

It must be a problem with my form/subform naming convention - Can anyone help with this.

Thanks ... Peter
 

Users who are viewing this thread

Back
Top Bottom