Minggu, 26 Mei 2013

[MS_AccessPros] Help - NotInList.

 



Hello All,

Am using the below code for my NotInList combo control of my dataentry. It
did fired up the NotInList and pop me the message and if answered Yes, it
opens up the form to continue filling up the rest controls.

But the problem is, it ask me again to enter the PolicyNumber which is
already entered in my combo box, it should carry/save to the opened form as
I already entered before the NotInList fired up

Can someone please examine the code and tell me the missing part..

Thank you in advance,

Zjubias..

-------------------

Private Sub CboPolicy_NotInList(NewData As String, Response As Integer)

On Error GoTo Err_ CboPolicy _NotInList

Dim strMsg As String, strTitle As String

strMsg = NewData & " is not in list. Would you like to add it?"

strTitle = " Add New Entry ?"

If MsgBox(strMsg, vbQuestion + vbYesNo, strTitle) = vbYes Then

DoCmd.OpenForm "frmPolicy", , , , acFormAdd, acDialog

Response = acDataErrAdded

Else

Response = acDataErrContinue

End If

Exit_ CboPolicy _NotInList:

Exit Sub

Err_ CboPolicy _NotInList:

MsgBox Err.Number & ":" & Err.Description

Resume Exit_ CboPolicy _NotInList

End Sub

-----------------

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (41)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar