Not in list event

G

Guest

Hello

I'm having a little problem with my not in list event and was hoping someone might be able to find my mistake

here what I have
'This routine requires the Microsoft DAO Object Library to be installed as a referenc
Dim rst As DAO.Recordse
If MsgBox("The Project Number that you entered is not part of the current list." & vbCrLf & "Would you like to add " & " '" & NewData & "' " & " to the existing list?" & vbCrLf & vbCrLf & "Press Ok to add it to the list or press Cancel to select one from the list", vbOKCancel, "Add Entry to List?!") = vbOK The
Set rst = CurrentDb.OpenRecordset("tbl_Project Info"
With rs
.AddNe
.Fields("Project Number") = NewDat
.Updat
.Clos
End Wit
Set rst = Nothin
Response = acDataErrAdde
Els
Response = acDataErrContinu
End I

It works and create a new entry in the appropriate table. The problem is that the form on which the combobox event is triggered always goes to the next record after the not in list event. I don't understand why

any ideas

Dan
 
J

John Spencer (MVP)

Is the combobox control the last control in the tab order? Do you have any
other event code for the combobox?

As far as I know, this is not the normal behavior.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with this Event Procedure 9
Cancel event "not in list" if before update is not true 5
Not in list error 2
form question 3
combo box NotInList Event 4
Code not working 1
Not in list event 10
Before Update event 3

Top