I select from names in combo184. If the name is not in the list I found this code that works
Dim strTmp As String
'Get confirmation that this is not just a spelling error.
strTmp = "Add '" & NewData & "' as a new Requester?"
If MsgBox(strTmp, vbYesNo + vbDefaultButton2 + vbQuestion, "Not in list") = vbYes Then
'Append the NewData as a record in the Categories table.
strTmp = "INSERT INTO tblrequesterdetails (Requester ) " & _
"SELECT """ & NewData & """ AS Requester;"
DBEngine(0)(0).Execute strTmp, dbFailOnError
'Notify Access about the new record, so it requeries the combo.
Response = acDataErrAdded
'frmallrequester.SetFocus
End If
I want to open a form that contains more data like city state, etc. When I did It kept on saying it was missing the data even thou this had already added then I got duplicate error messages. Maybe there is a way to do it all on the form. Here is what i want do happen when not in list is activate
open form frmrequestersadd as a new record with requester displayed as the user had typed it out.
Thanks for the help.
Dim strTmp As String
'Get confirmation that this is not just a spelling error.
strTmp = "Add '" & NewData & "' as a new Requester?"
If MsgBox(strTmp, vbYesNo + vbDefaultButton2 + vbQuestion, "Not in list") = vbYes Then
'Append the NewData as a record in the Categories table.
strTmp = "INSERT INTO tblrequesterdetails (Requester ) " & _
"SELECT """ & NewData & """ AS Requester;"
DBEngine(0)(0).Execute strTmp, dbFailOnError
'Notify Access about the new record, so it requeries the combo.
Response = acDataErrAdded
'frmallrequester.SetFocus
End If
I want to open a form that contains more data like city state, etc. When I did It kept on saying it was missing the data even thou this had already added then I got duplicate error messages. Maybe there is a way to do it all on the form. Here is what i want do happen when not in list is activate
open form frmrequestersadd as a new record with requester displayed as the user had typed it out.
Thanks for the help.