By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

docmd.setwarnings false isn't working...

P: n/a
I have the following code:

Private Sub cmbNYAdmit_NotInList(NewData As String, Response As
Integer)
On Error GoTo Err_cmbNYAdmit_NotInList

Dim Msg, Style, Title
Msg = "Please choose Yes, No or Pending from the list. Thank you."
Style = vbOKOnly
Title = "Please Choose From the List"
Response = MsgBox(Msg, Style, Title)
Me.cmbNYAdmit.Undo
Me.cmbNYAdmit.Requery
Exit_cmbNYAdmit_NotInList:
Exit Sub

Err_cmbNYAdmit_NotInList:
MsgBox Err.Description
Resume Exit_cmbNYAdmit_NotInList
End Sub

-------

As you can see it is for the notinlist event of a combo box. I had put
docmd.setwarnings false at the beginning and true at the end. Then I
took the true statement out. No matter what, I still get the Access
error message after my message. I says " the text you entered is not
in the list" with an ok. What am I doing wrong please, and how can I
suppress this message properly?

Thank you.

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
misscrf wrote:
I have the following code:
Private Sub cmbNYAdmit_NotInList(NewData As String, Response As
Integer)
On Error GoTo Err_cmbNYAdmit_NotInList

Dim Msg, Style, Title
Msg = "Please choose Yes, No or Pending from the list. Thank you."
Style = vbOKOnly
Title = "Please Choose From the List"
MsgBox Msg, Style, Title
response = acdataerrcontinue

Exit_cmbNYAdmit_NotInList:
Exit Sub

Err_cmbNYAdmit_NotInList:
MsgBox Err.Description
Resume Exit_cmbNYAdmit_NotInList
End Sub
-------

As you can see it is for the notinlist event of a combo box. I had put
docmd.setwarnings false at the beginning and true at the end. Then I
took the true statement out. No matter what, I still get the Access
error message after my message. I says " the text you entered is not
in the list" with an ok. What am I doing wrong please, and how can I
suppress this message properly?

Thank you.

Nov 13 '05 #2

P: n/a
Thank you!

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.