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