TabCtl

  • Thread starter Thread starter Dudy
  • Start date Start date
D

Dudy

Have subform Ingredients.
On ingredients I have set the event procedure to open
the frmIngredient on double click every thing works
well. Now I have moved the form to a tab index as a
subform frmIngredient.
What code do i need to add to my code to open
the subform in the tab.

Tab info:
Tab Ctl42
Page Name: Add Ingredients
PageIndex 5

Private Sub cboIngredientID_DblClick(Cancel As Integer)
On Error GoTo Err_IngredientID_DblClick
Dim lngIngredientID As Long

If IsNull(Me![IngredientID]) Then
Me![IngredientID].Text = ""
Else
lngIngredientID = Me![IngredientID]
Me![IngredientID] = Null
End If
DoCmd.OpenForm "frmIngredient", , , , , acDialog, "GotoNew"
Me![IngredientID].Requery
If lngIngredientID <> 0 Then Me![IngredientID] = lngIngredientID

Exit_IngredientID_DblClick:
Exit Sub

Err_IngredientID_DblClick:
MsgBox Err.Description
Resume Exit_IngredientID_DblClick
End Sub

One of many questions to follow
Thanks
 
If you have the subform on the form then the subform is already opened. You
just need to go to the tab.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Back
Top