I have a main form "swbEquipment" with 2 subforms on it
"fsub01" and "fsub02"
both have a common ID field "UnitID" which is numeric
Basically, Calling by a button on the main form I have some code that I want to make fsub02 visible and goto a record based on fsub01
I have been playing around with this code for nearly a whole day but cannot get it right.
at the moiment it hangs on
I'm sure it is mearly a reference problem but can't seem to get a handle on it.
any ideas where I might be wrong?
ElseIf LblSub3.Caption = "View Service Record" Then
Dim rs As Recordset
Dim lngUnitID As Integer
lngUnitID = Me!fsub01.Form!UnitID
Set rs = Forms!swbEquipment!fsub01.Form.RecordsetClone
Me.fsub02.SourceObject = "subfrmGRMachineryServicefrm"
Me.fsub02.Visible = True
rs.RecordsetClone.FindFirst "[UnitID]= " & lngUnitID
If Not rs.NoMatch Then
rs.Bookmark = rs.Bookmark
Me.fsub01.Visible = False