Hi Everyone
I have a subform on a tab controlled form. I have a pop up search form that I use to find a record set. What I am trying to do is on the double click event for the list box on the search form, it sets the forms tag property to the specified item in the list box.
the way I normally have it is this:
in the form open cmd button:
<code>
Private Sub ctlBtFindOrg_Click()
Dim strSearch As String
CustomerID.Enabled = True
CustomerID.Locked = False
DoCmd.GoToControl "[CustomerID]"
DoCmd.OpenForm "OrgSearch", acNormal, "", "", , acDialog
strSearch = Me.Tag
If Len(strSearch) > 0 Then
DoCmd.FindRecord strSearch, acEntire, False, acSearchAll
End If
CustomerID.Locked = True
End Sub
</code>
on the double click event on the search form:
<code>
Forms![F-Customer].Tag = Me.ctlLstBxResult.Column(0)
DoCmd.Close acForm, "OrgSearch"
</code>
the above is just a working example that i usually use. The problem I am having is that I can't quite reference the form I need to because of the tabbed form it is in.
The Tabbed form name is: f-customer_view
The tab number is: TabCtl0
The subform name is: f-Bookings_Current
The Tab Name is: Bookings
To bounce from Tab to Tab when I am in the form [f-Customer_view], I have used:
<code>
GotoTab "Bookings", Me.TabCtl0
Me.f_Bookings_Current.SetFocus
</code>
It works fine. But I can't reference it from a form that isn't in that set
(ie. forms![f-Customer_view]![f_Bookings_Current]
Any help would be greatly appreciated
thanks everyone
jeremy
I have a subform on a tab controlled form. I have a pop up search form that I use to find a record set. What I am trying to do is on the double click event for the list box on the search form, it sets the forms tag property to the specified item in the list box.
the way I normally have it is this:
in the form open cmd button:
<code>
Private Sub ctlBtFindOrg_Click()
Dim strSearch As String
CustomerID.Enabled = True
CustomerID.Locked = False
DoCmd.GoToControl "[CustomerID]"
DoCmd.OpenForm "OrgSearch", acNormal, "", "", , acDialog
strSearch = Me.Tag
If Len(strSearch) > 0 Then
DoCmd.FindRecord strSearch, acEntire, False, acSearchAll
End If
CustomerID.Locked = True
End Sub
</code>
on the double click event on the search form:
<code>
Forms![F-Customer].Tag = Me.ctlLstBxResult.Column(0)
DoCmd.Close acForm, "OrgSearch"
</code>
the above is just a working example that i usually use. The problem I am having is that I can't quite reference the form I need to because of the tabbed form it is in.
The Tabbed form name is: f-customer_view
The tab number is: TabCtl0
The subform name is: f-Bookings_Current
The Tab Name is: Bookings
To bounce from Tab to Tab when I am in the form [f-Customer_view], I have used:
<code>
GotoTab "Bookings", Me.TabCtl0
Me.f_Bookings_Current.SetFocus
</code>
It works fine. But I can't reference it from a form that isn't in that set
(ie. forms![f-Customer_view]![f_Bookings_Current]
Any help would be greatly appreciated
thanks everyone
jeremy