Hi
I have looked though lots of threads and have pieced together the following in an attempt to open frm_Payee when the Payee is not in the combo list, it is working in a fashion but gives the message and opens the form but that is about as far as I can get...I am trying to have the message appear when the Payee is not in the list when the message asks do you want to add new payee frm_Payee opens inserting the not in list Payee name on the form and creating a new PayeeID !!! I have a related table tbl_Bank which I think is causing a problem also ie frm_Payee has a drop down for the relevant bank...am I asking too much
many of the threads I read I sure will work for me but I cant apply them correctly would anyone out there be kind enough to point me in the right direction ...again...thanks in advance ...cheers Fi
Private Sub cb3_NotInList(NewData As String, Response As Integer)
Response = MsgBox("The Payee you have entered is new and not in this list." & vbCrLf & vbCrLf _
& "Would you like to add it?", vbQuestion + vbYesNo, "New Payee?")
If Response = vbYes Then
Set db = CurrentDb
stDocName = "frm_payee"
DoCmd.OpenForm stDocName, , , , acFormAdd, , strArgs
End If
End Sub
I have looked though lots of threads and have pieced together the following in an attempt to open frm_Payee when the Payee is not in the combo list, it is working in a fashion but gives the message and opens the form but that is about as far as I can get...I am trying to have the message appear when the Payee is not in the list when the message asks do you want to add new payee frm_Payee opens inserting the not in list Payee name on the form and creating a new PayeeID !!! I have a related table tbl_Bank which I think is causing a problem also ie frm_Payee has a drop down for the relevant bank...am I asking too much
Private Sub cb3_NotInList(NewData As String, Response As Integer)
Response = MsgBox("The Payee you have entered is new and not in this list." & vbCrLf & vbCrLf _
& "Would you like to add it?", vbQuestion + vbYesNo, "New Payee?")
If Response = vbYes Then
Set db = CurrentDb
stDocName = "frm_payee"
DoCmd.OpenForm stDocName, , , , acFormAdd, , strArgs
End If
End Sub
Last edited: