On Not on list event

  • Thread starter Thread starter Rani
  • Start date Start date
R

Rani

Hi guys,

I'm trying to define a not on list event.

What I would like the code to do is:

1.. initiate a Text Box Massage
2.. opening a form
3.. entering information
4.. passing value back to the combo box




I was using some code that produces the following:

..

1.. Opened the new form.
2.. Initiate the access Msg – item not in the list


Any idea as to what I was doing wrong ?





Here is the code I was using, don't pay attention to the sMsg string they
are in Hebrew.





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

Dim sMsg, Title, Style, MyString



If Not (IsNull(CustNameCombo)) Then



sMsg = "??? ?????? ?????? ?º?? ?? ? " & NewData & ""

Title = "?º?? ?? ???? ????? ?º????"

Style = vbOKOnly

Response = MsgBox(sMsg, Title, Style)



If MsgBox(vbOKOnly) = vbOK Then

DoCmd.OpenForm "AddCustFrm"





End If

End If

End Sub
 
Back
Top