shuffine@hcreit.com
Registered User.
- Local time
- Today, 14:49
- Joined
- Dec 18, 2013
- Messages
- 19
I am working in Access 2010. A bound combo box, Not In List event. I have the following code. It opens up a form to add the new name in. The form opens and then the "Not in List" message pops up. I have tried adding the SetWarnings to both forms, created a SetWarning macro, to no available. The message keeps popping up. Please help! My code is below. I know I need to set the warnings back to true - but for now, I just want to get rid of the message before sticking it back into the code.
Dim intAnswer As Integer
Dim strSQL As String
intAnswer = MsgBox("The acquirer/buyer " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbQuestion + vbYesNo, "Healthcare REIT")
If intAnswer = vbYes Then
DoCmd.SetWarnings False
DoCmd.OpenForm "frmASO", acNormal, , , acFormAdd, , acDialog
Else
MsgBox "Please choose an acquirer/buyer from the list." _
, vbInformation, "Healthcare REIT"
Response = acDataErrContinue
End If
Dim intAnswer As Integer
Dim strSQL As String
intAnswer = MsgBox("The acquirer/buyer " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbQuestion + vbYesNo, "Healthcare REIT")
If intAnswer = vbYes Then
DoCmd.SetWarnings False
DoCmd.OpenForm "frmASO", acNormal, , , acFormAdd, , acDialog
Else
MsgBox "Please choose an acquirer/buyer from the list." _
, vbInformation, "Healthcare REIT"
Response = acDataErrContinue
End If