Kamis, 29 September 2011

Re: [MS_AccessPros] error 13 type mismatch

 

John, Thanks for quick reply.I didn't mentioned some details and some control names doesn't fitting English. So I am writing the code with some change.There are 3 controls on the form which depends a table with 3 fields. By the way I tried the way you have suggested but it gave an error message:error 424:object required. The code is like:

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_CaseRecord"

If CurrentProject.AllForms(strcCallingForm).IsLoaded Then
Set cbo = Forms(strcCallingForm)!CaseRecord_ID
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

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar