Hello,
I have created a navigation pane form (Init_Form2) which contains a subform (Store_Down_Subform) which includes a subform (Store_Down_Subform_Datasheet).
Both, Store_Down_Subform and Store_Down_Subform_Datasheet show the data from the same table. the idea is to create a sort of split form (split forms unfortunately don't work in navigation pane forms). What I need to do is that when a user sets focus on a certain record in Store_Down_Subform_Datasheet, Store_Down_Subform moves to the corresponding record.
I am using the following code:
Code:
Private Sub Store_Down_GotFocus()
Call sendtorecord
End Sub
Private Sub sendtorecord()
Dim recNum As Long
Dim formName As String
formName = "Store_Down_Subform"
recNum = Me.CurrentRecord
'DoCmd.SelectObject acForm, formName, True
'On Error Resume Next
Forms!Init_Form2.Store_Down_subform.Requery
DoCmd.GoToRecord aForm, formName, acGoTo, recNum
'On Error GoTo 0
End Sub
The original code works with Store_Down_Subform form open, but it doesn't when it's in the navigation pane, so I have tried different possibilities.
I included the code with all the options I have used, but none works (select object, requery, etc.)
I would much appreciate your assistance.