L
lisa
What is the coding to add a record to a table underlying a
combo box in a subform so that it appears.
I have tried DblClick as below but get the following
msg: "object doesn't support this property or method".
What am I doing wrong??
Private Sub Type_of_Link_DblClick(Cancel As Integer)
On Error GoTo Err_LinkTypeID_DblClick
Dim lngLinkTypeID As Long
If IsNull(Me![LinkTypeID]) Then
Me![LinkTypeID].Text = ""
Else
lngLinkTypeID = Me![LinkTypeID]
Me![LinkTypeID] = Null
End If
DoCmd.OpenForm "Link Types", , , , , acDialog, "GotoNew"
Me![LinkTypeID].Requery
If lngLinkTypeID <> 0 Then Me![LinkTypeID] =
lngLinkTypeID
Exit_LinkTypeID_DblClick:
Exit Sub
Err_LinkTypeID_DblClick:
MsgBox Err.Description
Resume Exit_LinkTypeID_DblClick
End Sub
combo box in a subform so that it appears.
I have tried DblClick as below but get the following
msg: "object doesn't support this property or method".
What am I doing wrong??
Private Sub Type_of_Link_DblClick(Cancel As Integer)
On Error GoTo Err_LinkTypeID_DblClick
Dim lngLinkTypeID As Long
If IsNull(Me![LinkTypeID]) Then
Me![LinkTypeID].Text = ""
Else
lngLinkTypeID = Me![LinkTypeID]
Me![LinkTypeID] = Null
End If
DoCmd.OpenForm "Link Types", , , , , acDialog, "GotoNew"
Me![LinkTypeID].Requery
If lngLinkTypeID <> 0 Then Me![LinkTypeID] =
lngLinkTypeID
Exit_LinkTypeID_DblClick:
Exit Sub
Err_LinkTypeID_DblClick:
MsgBox Err.Description
Resume Exit_LinkTypeID_DblClick
End Sub