Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Err.Number does not work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George R - 07 Jan 2006 19:18 GMT
I get a zero and a blank when I write err.number and err.description into my
error MsgBox.
If I write error$ I get a message with no number.
There wa a similar question posted on 11/21 and I tried the suggested
solution to no avail.
Thank you for your consideration.
Ofer - 07 Jan 2006 20:41 GMT
I'm not sure why the Err.Description doesn't work
I just use Err  to get the number, and Error to get the description.

Signature

\\// Live Long and Prosper \\//

> I get a zero and a blank when I write err.number and err.description into my
> error MsgBox.
> If I write error$ I get a message with no number.
> There wa a similar question posted on 11/21 and I tried the suggested
> solution to no avail.
> Thank you for your consideration.
George R - 07 Jan 2006 22:00 GMT
Thanks, Ofer. That worked just fine.

> I'm not sure why the Err.Description doesn't work
> I just use Err  to get the number, and Error to get the description.
[quoted text clipped - 5 lines]
> > solution to no avail.
> > Thank you for your consideration.
Dirk Goldgar - 07 Jan 2006 22:08 GMT
> I get a zero and a blank when I write err.number and err.description
> into my error MsgBox.
> If I write error$ I get a message with no number.
> There wa a similar question posted on 11/21 and I tried the suggested
> solution to no avail.
> Thank you for your consideration.

It sounds like you're accessing the Err object when there's no error, or
the original error has been cleared.  Please post the relevant code.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

david@epsomdotcomdotau - 07 Jan 2006 22:35 GMT
Normally you code like this:

Exit Sub
Catch:
   MsgBox Err.Number & ": " & err.description
End Sub

If you accidentally loose the "Exit Sub" line you will get
the problem you are reporting.

(david)

> I get a zero and a blank when I write err.number and err.description into my
> error MsgBox.
> If I write error$ I get a message with no number.
> There wa a similar question posted on 11/21 and I tried the suggested
> solution to no avail.
> Thank you for your consideration.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.