K
kevins \(remove this\)
I have 'cribbed a bit of code that allows a user to double
click a combo box to open a form that allows you to add an
item to the table if if is not present, update the table
and subsequently, updates the field that thwe user
originally double clicked. I have addded this event
procedure to the doublice click event but I get a type
mismatch error. Here's the code - any clues?
Thanks
Private Sub COMBO73_DblClick(Cancel As Integer)
On Error GoTo Err_COMBO73_DblClick
Dim lngCOMBO73 As Long
If IsNull(Me![Combo73]) Then
Me![Combo73].Text = ""
Else
lngCOMBO73 = Me![Combo73]
Me![Combo73] = Null
End If
DoCmd.OpenForm "frmSECTOR", , , , , acDialog, "GotoNew"
Me![Combo73].Requery
If lngCOMBO73 <> 0 Then Me![Combo73] = lngCOMBO73
Exit_COMBO73_DblClick:
Exit Sub
Err_COMBO73_DblClick:
MsgBox Err.DESCRIPTION
Resume Exit_COMBO73_DblClick
End Sub
click a combo box to open a form that allows you to add an
item to the table if if is not present, update the table
and subsequently, updates the field that thwe user
originally double clicked. I have addded this event
procedure to the doublice click event but I get a type
mismatch error. Here's the code - any clues?
Thanks
Private Sub COMBO73_DblClick(Cancel As Integer)
On Error GoTo Err_COMBO73_DblClick
Dim lngCOMBO73 As Long
If IsNull(Me![Combo73]) Then
Me![Combo73].Text = ""
Else
lngCOMBO73 = Me![Combo73]
Me![Combo73] = Null
End If
DoCmd.OpenForm "frmSECTOR", , , , , acDialog, "GotoNew"
Me![Combo73].Requery
If lngCOMBO73 <> 0 Then Me![Combo73] = lngCOMBO73
Exit_COMBO73_DblClick:
Exit Sub
Err_COMBO73_DblClick:
MsgBox Err.DESCRIPTION
Resume Exit_COMBO73_DblClick
End Sub