WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

error logs

 
Goto page Previous  1, 2
   Home -> Office other -> General Discussions RSS
Next:  Protect Source Code  
Author Message
Afrosheen

External


Since: Sep 21, 2006
Posts: 40



(Msg. 9) Posted: Sat Jul 05, 2008 5:21 am
Post subject: Re: error logs [Login to view extended thread Info.]
Archived from groups: microsoft>public>access (more info?)

Hi Allen, Thanks for getting back to me.
I changed the module name to moderror. I ran the procedure under debug and
still came up with the error. I took out the domnd.help. I created that for
the error.

Private Sub Form_Open(Cancel As Integer)
' fld = True
On Error GoTo Form_Open_Error

x = y


On Error GoTo 0
Exit Sub

Form_Open_Error:
Call moderror(Err.Number, Err.Description, "somename()")
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
Form_Open of VBA Document Form_frm_emergency"
End Sub


Where the "somename()" is is that supposed to be the name of the procedure?

Thanks again. Your help is appreciated.

"Allen Browne" wrote:

> Thanks, Tom, for the suggestion.
>
> I would have to think through the implications of what you are saying.
> Benefits of *not* passing the error number and description would include the
> fact that the Err object is already global, and supports mulitple errors
> within it. What concerns me is the possibility that another error could
> occur, so that the current error is not the one that originally occurred.
> That was the point of copying the Err.Number and Err.Description from the
> Err object to the variables before passing it.
>
> Could that happen? I don't know. VBA is not multi-threaded, but JET is. Is
> there a chance that it could it fail in some future version of Access? We
> are certainly moving towards multi-core machines, and the software will go
> that way. VBA is unlikely to be re-written to be multi-threaded, but VBA
> calls in JET are not uncommon.
>
> So, I just don't know if it would be 100% reliable or not. It seemed to me
> that the safest path was to copy the error info to variable before anything
> else happened.
>
> Any further suggestions welcome.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Tom van Stiphout" <no.spam.tom7744.RemoveThis@cox.net> wrote in message
> news:c2rs64hdvkj5gqa3mi8sk0m5hpik20c9kn@4ax.com...
> > On Sat, 5 Jul 2008 00:20:02 +0800, "Allen Browne"
> > <AllenBrowne.RemoveThis@SeeSig.Invalid> wrote:
> >
> > Your function is called like this:
> > Call LogError(Err.Number, Err.Description, "SomeName()")
> > Personally I would not pass in the Err.Number and Description. The Err
> > object is global so the function can read these values itself.
> > In the occasional case you want a different description you could code
> > that as:
> > Err.Description = Err.Description & " My additional text goes here"
> > Call LogError(Err.Number, Err.Description, "SomeName()")
> >
> > -Tom.
> >
> >
> >>Presumably we are talking about this link:
> >> http://allenbrowne.com/ser-23a.html
>
>
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9672



(Msg. 10) Posted: Sat Jul 05, 2008 8:28 pm
Post subject: Re: error logs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You got the *same* error message after renaming the module?

Try a compact/repair (in case the old name is hanging around.)

If that doesn't solve it, there must be another naming clash in the database
somewhere or you would not get that same error message.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Afrosheen" <Afrosheen DeleteThis @discussions.microsoft.com> wrote in message
news:644660EB-1994-417C-8861-C9D197E9916F@microsoft.com...
> Hi Allen, Thanks for getting back to me.
> I changed the module name to moderror. I ran the procedure under debug and
> still came up with the error. I took out the domnd.help. I created that
> for
> the error.
>
> Private Sub Form_Open(Cancel As Integer)
> ' fld = True
> On Error GoTo Form_Open_Error
>
> x = y
>
>
> On Error GoTo 0
> Exit Sub
>
> Form_Open_Error:
> Call moderror(Err.Number, Err.Description, "somename()")
> MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
> Form_Open of VBA Document Form_frm_emergency"
> End Sub
>
>
> Where the "somename()" is is that supposed to be the name of the
> procedure?
>
> Thanks again. Your help is appreciated.
Back to top
Login to vote
Afrosheen

External


Since: Sep 21, 2006
Posts: 40



(Msg. 11) Posted: Sun Jul 06, 2008 10:24 am
Post subject: Re: error logs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Allen,
Sorry I haven't got back to you sooner. I did get the program working. Thanks.
I have another question for you concerning the routine. It came up with the
window.

Please write down the following details, etc. The error was error#424 Object
required. Unable to record because Error 3265. Item not found in this
collection.


I looked in the table for the error and there was not there. Is it supposed
to write the error or does it work off the case statement. If it works off
the case statements, then I take it I have to put the case number in it
correct?

Case 3314, 2104 and so on?

If possible I would like it to write the errors to the table because the
people using it are going to be data entry people and won't know how to fix
the problems.

Thanks again



"Allen Browne" wrote:

> You got the *same* error message after renaming the module?
>
> Try a compact/repair (in case the old name is hanging around.)
>
> If that doesn't solve it, there must be another naming clash in the database
> somewhere or you would not get that same error message.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Afrosheen" <Afrosheen.TakeThisOut@discussions.microsoft.com> wrote in message
> news:644660EB-1994-417C-8861-C9D197E9916F@microsoft.com...
> > Hi Allen, Thanks for getting back to me.
> > I changed the module name to moderror. I ran the procedure under debug and
> > still came up with the error. I took out the domnd.help. I created that
> > for
> > the error.
> >
> > Private Sub Form_Open(Cancel As Integer)
> > ' fld = True
> > On Error GoTo Form_Open_Error
> >
> > x = y
> >
> >
> > On Error GoTo 0
> > Exit Sub
> >
> > Form_Open_Error:
> > Call moderror(Err.Number, Err.Description, "somename()")
> > MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
> > Form_Open of VBA Document Form_frm_emergency"
> > End Sub
> >
> >
> > Where the "somename()" is is that supposed to be the name of the
> > procedure?
> >
> > Thanks again. Your help is appreciated.
>
>
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 9672



(Msg. 12) Posted: Mon Jul 07, 2008 1:50 am
Post subject: Re: error logs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

That means an error occurred in the LogError() function.

Temporarily disable the error handling in this function, by adding a single
quote to the 2nd line, i.e.:
'On Error GoTo Err_LogError
You will then be able to see which line caused the error.
That will let you know what item was not found.
Perhaps you don't have a table named tLogError?
Or perhaps you don't have a field named ErrNumber?
Or ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Afrosheen" <Afrosheen DeleteThis @discussions.microsoft.com> wrote in message
news:CCA9BB7F-ADF8-4976-8CC7-E1EE4BEE0065@microsoft.com...
> Hi Allen,
> Sorry I haven't got back to you sooner. I did get the program working.
> Thanks.
> I have another question for you concerning the routine. It came up with
> the
> window.
>
> Please write down the following details, etc. The error was error#424
> Object
> required. Unable to record because Error 3265. Item not found in this
> collection.
>
>
> I looked in the table for the error and there was not there. Is it
> supposed
> to write the error or does it work off the case statement. If it works off
> the case statements, then I take it I have to put the case number in it
> correct?
>
> Case 3314, 2104 and so on?
>
> If possible I would like it to write the errors to the table because the
> people using it are going to be data entry people and won't know how to
> fix
> the problems.
Back to top
Login to vote
Afrosheen

External


Since: Sep 21, 2006
Posts: 40



(Msg. 13) Posted: Mon Jul 07, 2008 1:50 am
Post subject: Re: error logs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Allen,
Thanks again for the help. It's people like you that I can count on for help.

I did find the problem. In the tLogError table, I had description spelled
wrong and CallingProc with a space in between Calling and Proc.

Thanks again. I'll mark the post that it was answered.



"Allen Browne" wrote:

> That means an error occurred in the LogError() function.
>
> Temporarily disable the error handling in this function, by adding a single
> quote to the 2nd line, i.e.:
> 'On Error GoTo Err_LogError
> You will then be able to see which line caused the error.
> That will let you know what item was not found.
> Perhaps you don't have a table named tLogError?
> Or perhaps you don't have a field named ErrNumber?
> Or ...
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Afrosheen" <Afrosheen DeleteThis @discussions.microsoft.com> wrote in message
> news:CCA9BB7F-ADF8-4976-8CC7-E1EE4BEE0065@microsoft.com...
> > Hi Allen,
> > Sorry I haven't got back to you sooner. I did get the program working.
> > Thanks.
> > I have another question for you concerning the routine. It came up with
> > the
> > window.
> >
> > Please write down the following details, etc. The error was error#424
> > Object
> > required. Unable to record because Error 3265. Item not found in this
> > collection.
> >
> >
> > I looked in the table for the error and there was not there. Is it
> > supposed
> > to write the error or does it work off the case statement. If it works off
> > the case statements, then I take it I have to put the case number in it
> > correct?
> >
> > Case 3314, 2104 and so on?
> >
> > If possible I would like it to write the errors to the table because the
> > people using it are going to be data entry people and won't know how to
> > fix
> > the problems.
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET