A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can you disable the debugger?



 
 
Thread Tools Display Modes
  #1  
Old January 10th, 2005, 05:12 PM
pokdbz
external usenet poster
 
Posts: n/a
Default 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  
Old January 10th, 2005, 07:43 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

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  
Old January 10th, 2005, 07:57 PM
pokdbz
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 01:07 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 07:17 AM
Larry Daugherty
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 03:31 PM
pokdbz
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 03:33 PM
pokdbz
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 04:13 PM
BruceM
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 04:49 PM
pokdbz
external usenet poster
 
Posts: n/a
Default

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  
Old January 11th, 2005, 08:59 PM
BruceM
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.