Results 1 to 2 of 2
  1. #1
    gio25 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    2

    Debug

    Hi



    I have made a database with forms, I have one form that the users enters a id and it present the users info. however if a user enters some crazy carcters or something that I don't know, the program present the error window the the end and debug buttons, if the users press the debug button it takes him to the code in VBA, my problem is that if the VBA editor opens the users start to type anything and the make things even worse. My question is there any way to prevent the users from accessing the VBA editor like block the debug button or block the error window at all? and there is a way to create some kind of log so I can see later what was the error?

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Error trapping may be a good idea. If you create a button using the dreaded wizard and then go into the event procedure you'll see an example of error trapping. For this scenario you may want to do a lookup in your user table prior to allowing the users entry. A simple DLookup() would do it. (http://techonthenet.com/access/funct...in/dlookup.php). If the DLookup() returns a null value the user has entered an invalid User ID. Tell them they have done so by a simple "IF" statement and then exit the sub prior to executing the rest of the code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-12-2011, 10:11 AM
  2. acces listbox hatası(acces debug)
    By carso in forum Access
    Replies: 1
    Last Post: 09-22-2009, 04:11 AM
  3. Access Form will not debug
    By Gene in forum Programming
    Replies: 4
    Last Post: 06-27-2009, 03:46 PM
  4. Is There a Way to Debug or Step Through VB code?
    By jeffbase34 in forum Programming
    Replies: 1
    Last Post: 05-28-2009, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums