473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to get rid of ms access default error?

194 100+
Hi everybody, im using the following code which is set on Not In List event of a combo box.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo32_NotInList(NewData As String, Response As Integer)
  2. Dim strMsg As String
  3. strMsg = "Value is not in list. Add it?"
  4. If MsgBox(strMsg, vbOKCancel) = vbOK Then
  5. DoCmd.OpenForm "Clients", , , , acAdd, acDialog, NewData
  6. If IsNull(DLookup("ClientID", "Clients", True)) Then
  7.  
  8. MsgBox "You failed to add a Subcategory that matched what you entered.  Please try again.", vbInformation
  9. Response = acDataErrContinue
  10. Else
  11. Response = acDataErrAdded
  12. End If
  13. Else
  14. Response = acDataErrDisplay
  15. End If
  16. End Sub
  17.  
  18.  
I am getting an error message if the value does not match with the values entered in the combo box. "The Text You Entered Is Not Item in the List". Please tell me what how i can get rid of it?
Nov 10 '08 #1
1 1087
ChipR
1,287 Expert 1GB
Looks like you need to change acDataErrDisplay to acDataErrContinue

Else
Response = acDataErrContinue
End If
End Sub


Chip
Nov 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Question how do you test stored...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
5
by: Lakbir Dhillon | last post by:
We converted our databases from Access 97 to Access 2002 (only the MDB files, not the MDW file). In addition we ported the Access application from a Citrix NT server to a Citrix XP server. We...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: Jon96 | last post by:
I know this posting may seem redundant, but I have not been able to get around this problem I am currently using Windows 2000 Professional with Visual Studio.Net 2002 and IIS 5. I am not on a...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.