G
Guest
I have this code on one form
Private Sub Owner_DblClick(Cancel As Integer
On Error GoTo Err_Owner_DblClic
Dim lngOwner As Lon
If IsNull(Me![Owner]) The
Me![Owner].Text = "
Els
lngOwner = Me![Owner
Me![Owner] = Nul
End I
DoCmd.OpenForm "Who Entry
Me![Owner].Requer
If lngOwner <> 0 Then Me![Owner] = lngOwne
Exit_Owner_DblClick
Exit Su
Err_Owner_DblClick
MsgBox Err.Descriptio
Resume Exit_Owner_DblClic
End Su
But I would like to modify it and place it in a class module so I can use it on several forms. How do I pass a reference of the combobox "Owner" to the function in the module so that I can replace all the me![owner]?
Private Sub Owner_DblClick(Cancel As Integer
On Error GoTo Err_Owner_DblClic
Dim lngOwner As Lon
If IsNull(Me![Owner]) The
Me![Owner].Text = "
Els
lngOwner = Me![Owner
Me![Owner] = Nul
End I
DoCmd.OpenForm "Who Entry
Me![Owner].Requer
If lngOwner <> 0 Then Me![Owner] = lngOwne
Exit_Owner_DblClick
Exit Su
Err_Owner_DblClick
MsgBox Err.Descriptio
Resume Exit_Owner_DblClic
End Su
But I would like to modify it and place it in a class module so I can use it on several forms. How do I pass a reference of the combobox "Owner" to the function in the module so that I can replace all the me![owner]?