I have a Main form (Navigation Sub-form) with two sub-forms
Code:
Assets
Asset Tracking
Asset Groups
As I move from one record to the next in the Asset Groups sub-form, I want the Main form to display that Asset Record.
Currently, I have it programmed so that when I Dbl-Clk on the Tag column in an Asset Groups record, it synchronizes the main form to show that record. This works fine. However, I would rather have it so the main form synchronizes as I move from record to record in the Asset Groups sub-form, either by using the mouse or clicking in the navigation column of a record.
The On Current event property for the sub-form seems to do just that, so I thought I would just copy the code from the On Double Click event property into the On Current event property. However, it errors out on the ".Bookmark =..." line, when used in the context of the On Current property.
Below, is the code which works in the Double Click property of the Tag column. How can I modify this to work with the On Current property of the sub-form? The name of the field in the Tag column is "BarCode".
Code:
Private Sub BarCode_DblClick(Cancel As Integer)
With Forms![Manage SCATeam].NavigationSubform.Form
.RecordsetClone.FindFirst "ID=" & Me.ID
.Bookmark = .RecordsetClone.Bookmark
End With
End Sub
Screen Print: