If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can you disable the debugger?
I have an error which brings up the debugger screen to end of debug. Is
there a way to stop this from happening. |
#2
|
|||
|
|||
Eliminate what's causing the error; or put in an error handler that traps
the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#3
|
|||
|
|||
Maybe you can help? The problem is with a mask on a date field. If a person
mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#4
|
|||
|
|||
Not knowing the details of your setup, you could use the BeforeUpdate event
of the textbox to validate that what was entered is a valid date; and if not, cancel the event and tell the user to enter a valid date. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#5
|
|||
|
|||
Look in Access Help for Error Handling.
HTH -- -Larry- -- "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#6
|
|||
|
|||
Ok that sounds like a good idea, it will check it to see if it is a valid
date before moving tot he next field right? The before update is in the properties of the text box right? How do you check to see if it is a valid date? Do you know of a little piece of code that would do this? Thanks for being so patient "Ken Snell [MVP]" wrote: Not knowing the details of your setup, you could use the BeforeUpdate event of the textbox to validate that what was entered is a valid date; and if not, cancel the event and tell the user to enter a valid date. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#7
|
|||
|
|||
I have tried looking and found the Error Handling part but could not many any
sense of it of what to do and how to impliment it into my current situation. Any suggestions "Larry Daugherty" wrote: Look in Access Help for Error Handling. HTH -- -Larry- -- "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#8
|
|||
|
|||
In general you could have something like this in the after update event for
the text box (named txtDate in this example): Private Sub txtDate_AfterUpdate() On Error GoTo Err_txtDate_AfterUpdate Exit_txtDate_AfterUpdate: Exit Sub Err_txtDate_AfterUpdate: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_txtDate_AfterUpdate End Sub In the example, Err_txtDate_AfterUpdate: is a line label. GoTo sends the code there in case of an error. The error message will give you an error number (let's say 1234). Now change the above code with the following after Err_txtDate_AfterUpdate: If Err.Number = 1234 Then msgbox "Incorrect date format", vbCritical, "Format Error" Else: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_imgCmdCal2nd_Click End If End Sub By the way, check Visual Basic help rather than Access Help. It is often more complete on this sort of thing. "pokdbz" wrote: I have tried looking and found the Error Handling part but could not many any sense of it of what to do and how to impliment it into my current situation. Any suggestions "Larry Daugherty" wrote: Look in Access Help for Error Handling. HTH -- -Larry- -- "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#9
|
|||
|
|||
That didn't seem to catch the error here is what I put in:
Private Sub BirthDate_AfterUpdate() On Error GoTo Err_BrithDate_AfterUpdate Exit_BirthDate_AfterUpdate: Exit Sub Err_BirthDate_AfterUpdate: If Err.Number = 2279 Then MsgBox "Incorrect date format", vbCritical, "Format Error" Else: MsgBox "Error #: " & Err.Number & " " & Err.description Resume Exit_imgCmdCal2nd_Click End If End Sub Did I do something wrong? Do you have any other suggestions? "BruceM" wrote: In general you could have something like this in the after update event for the text box (named txtDate in this example): Private Sub txtDate_AfterUpdate() On Error GoTo Err_txtDate_AfterUpdate Exit_txtDate_AfterUpdate: Exit Sub Err_txtDate_AfterUpdate: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_txtDate_AfterUpdate End Sub In the example, Err_txtDate_AfterUpdate: is a line label. GoTo sends the code there in case of an error. The error message will give you an error number (let's say 1234). Now change the above code with the following after Err_txtDate_AfterUpdate: If Err.Number = 1234 Then msgbox "Incorrect date format", vbCritical, "Format Error" Else: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_imgCmdCal2nd_Click End If End Sub By the way, check Visual Basic help rather than Access Help. It is often more complete on this sort of thing. "pokdbz" wrote: I have tried looking and found the Error Handling part but could not many any sense of it of what to do and how to impliment it into my current situation. Any suggestions "Larry Daugherty" wrote: Look in Access Help for Error Handling. HTH -- -Larry- -- "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
#10
|
|||
|
|||
Make the Resume line BirthDate rather than the leftover control name in the
code I copied from one of my projects but did not fully modify. You have determined for sure that it is error 2279 (perhpas by entering an incorrect format on purpose)? "pokdbz" wrote: That didn't seem to catch the error here is what I put in: Private Sub BirthDate_AfterUpdate() On Error GoTo Err_BrithDate_AfterUpdate Exit_BirthDate_AfterUpdate: Exit Sub Err_BirthDate_AfterUpdate: If Err.Number = 2279 Then MsgBox "Incorrect date format", vbCritical, "Format Error" Else: MsgBox "Error #: " & Err.Number & " " & Err.description Resume Exit_imgCmdCal2nd_Click End If End Sub Did I do something wrong? Do you have any other suggestions? "BruceM" wrote: In general you could have something like this in the after update event for the text box (named txtDate in this example): Private Sub txtDate_AfterUpdate() On Error GoTo Err_txtDate_AfterUpdate Exit_txtDate_AfterUpdate: Exit Sub Err_txtDate_AfterUpdate: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_txtDate_AfterUpdate End Sub In the example, Err_txtDate_AfterUpdate: is a line label. GoTo sends the code there in case of an error. The error message will give you an error number (let's say 1234). Now change the above code with the following after Err_txtDate_AfterUpdate: If Err.Number = 1234 Then msgbox "Incorrect date format", vbCritical, "Format Error" Else: msgbox "Error #: " & Err.Number & " " & Err.Description Resume Exit_imgCmdCal2nd_Click End If End Sub By the way, check Visual Basic help rather than Access Help. It is often more complete on this sort of thing. "pokdbz" wrote: I have tried looking and found the Error Handling part but could not many any sense of it of what to do and how to impliment it into my current situation. Any suggestions "Larry Daugherty" wrote: Look in Access Help for Error Handling. HTH -- -Larry- -- "pokdbz" wrote in message ... Maybe you can help? The problem is with a mask on a date field. If a person mistypes something or doesn't put in a valid date and tries to go to the next text box it says that it is the wrong date and then goes into the debugger. How is this avoidable can you use the on error since it is not in a subroutine. Any suggestions? Or how can I set up something to catch the error before it goes into the debugger? Thanks "Ken Snell [MVP]" wrote: Eliminate what's causing the error; or put in an error handler that traps the error and does something with it, even if ignoring it. See On Error statement in Help file for more info. -- Ken Snell MS ACCESS MVP "pokdbz" wrote in message ... I have an error which brings up the debugger screen to end of debug. Is there a way to stop this from happening. |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Status of 'Disable Features' Issues | [email protected] | General Discussion | 7 | January 6th, 2005 10:42 PM |
Disable "update links" dialog box in PowerPoint | Ray Maas | Powerpoint | 1 | December 30th, 2004 07:23 PM |
how do i disable CTRL+< and CTRL+> | Keith G Hicks | Using Forms | 7 | October 15th, 2004 05:10 PM |
Disable any key globally for complete database | Irshad Alam | Using Forms | 1 | August 17th, 2004 04:33 PM |
Disable user to Maximize the form | Irshad Alam | Using Forms | 0 | August 15th, 2004 03:19 PM |