Dear members,I am using Access 2003. I have a form with a combobox. When there is not a data I double click the combo to open a pop up form and put new records with it. I found this VB code at Allen Brown's web site and used it. It works but it gives ErrorNo:13..type mismatch. By the way it saves my data but it does not requery the combo box. I am not good with VB codes, how can I solve the problem? Thanks for your help in advance.
Private Sub Form_AfterUpdate()
On Error GoTo Err_Handler
'Purpose: Requery the combo that may have called this in its DblClick
Dim cbo As ComboBox
Dim iErrCount As Integer
Const strcCallingForm = "frm_Ýs_Kaydý"
If CurrentProject.AllForms(strcCallingForm).IsLoaded Then
Set cbo = Forms(strcCallingForm)!ÝsNo
cbo.Requery
End If
Exit_Handler:
Exit Sub
Err_Handler:
'Undo the combo if it has a partially entered value.
If (Err.Number = 2118) And (iErrCount < 3) And Not (cbo Is Nothing) Then
cbo.Undo
Resume
End If
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Exit_Handler
End Sub
Kamis, 29 September 2011
[MS_AccessPros] error 13 type mismatch
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar