Results 1 to 12 of 12
  1. #1
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451

    numbering code for error tracking


    does anyone have or know of any code for numbering my code for using the ERL function? i have done some checking and the main one that everyone referrs to as being a free version, i believe it is MZTOOLS version 3 is no longer available. sorry, i'm cheap and would rather not pay for something that i'm not going to use enough to get my money out of. is there another way of numbering code other than buying one of these utilities of doing it by hand? Sorry don't mean to sound down on the utilities, my understanding is that they do a great job and those individuals need to get the money they deserve for the service they are providing, i just don't know if i'll be done once i finish my current project or have 10 more. its hard for me to justify the expence.

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    I don't often use line numbers, so can't comment on that. MZTools has worked on every version of Access that I've used it with, including A2016.
    Attachment 24535

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    @davegri: Just curious - I've always been under the impression that once the file has been compiled to .accde or .accdr the numbering is removed along with comments etc - do you know if this is the case?

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    @davegri: Just curious - I've always been under the impression that once the file has been compiled to .accde or .accdr the numbering is removed along with comments etc - do you know if this is the case?
    Beats me. I only worked with one compiled database with the runtime and I never tried to look at the accde.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Just out of curiosity, vicsaccess, why do you want to number your code?



    I use "PrettyCode.Print for VB6/VBA". It is an add-in; it will number code lines and add lines for control structures (for ... next, do while....loop). (when printing - can view on screen)
    I just checked the web site: apparently it is not supported any longer or being developed/maintained.

    That is the bad news. The good news is that it is a free download (with License Key on the download site) .

    See "subMain" http://community.submain.com/files/default.aspx

  6. #6
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Thanks for the replies. Davegri, its actually not my Access version, in the past MZTOOLS had a free version that they offered and everywhere that i have searched on the internet says that it is the best out there and they all suggest using this MZTOOLSVS3 but when i went looking for it appearently they have upgraded the pay version and no longer offer the free one, that s87ks. i couldn't get to the link you provided due to work internet restrictions so i'll look at it tonight on my own computer, thanks.

    Steve, thanks for the alternate program, i'll look into it tonight also. As for my reason for wanting to number my code, simple, i wrote it. As much as all of you have taught me and pointed in directions for learning and overcoming my current hurdle in front of me, i wrote it. This is the first database that i have wrote that is fulled coded and if i may say, very complicated but sweet. i have good error tracking in it that will help with handling the issues that come up but having the ability to track an error down to its line number rather that sub or function would definately have time advantates in finding and fixing issues.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by Ajax View Post
    ...I've always been under the impression that once the file has been compiled to .accde or .accdr the numbering is removed along with comments etc - do you know if this is the case...
    How could you tell? What does it matter? Once compiled to .accde you can't access the Design View or the Code Module for a Form. Comments/Line Numbers aren't removed form the source .accdb file, if that's your question.

    Or am I misreading your question?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Here is a thing I wrote that will ERL a fully outdented text file.

    https://www.accessforums.net/showthread.php?t=58620


    Also, once the code is compiled the ERL lines do stay there. If you have an exsisting error handler, you can add "& erl" to any message box or other output you have and find out what line is having the problem. I went to the extent of having an error handler tell me the sub it was in and the line it was on when the error occurred.

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    What does it matter? Once compiled to .accde you can't access the Design View or the Code Module for a Form
    Agreed, but the MZtool has an error reporting facility to report the line number of code which generated the error. I've never used it and always supply db's in accde -my apps email me with details of any unexpected errors (err num/description, function/sub name activeform/activecontrol etc) - so for me no point including a tool to report the line number if not available in .accde (or if it does, an incorrect one) - and assuming there aren't any licensing issues. If a line number was available, it might help me to home in on what the issue may be. I'm pretty good at handling errors so don't get many emails, but sometimes users can find a way to do something I hadn't anticipated.

  10. #10
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Quote Originally Posted by Ajax View Post
    sometimes users can find a way to do something I hadn't anticipated.
    In my case, the ERL numbers helped a ton. I automate company intranet sites, and they have a tendency to change the page quite often. Using ERL lines I can find out exactly what html element changed, No more guessing or reviewing all of the coded html IDs or even changing the innertext loops.

    I've found myself at a new company now and they have tons of these scripts running throughout various departments/buildings/states/countries. Every time I have to debug one of these scripts I add ERL lines, because I'm unfamiliar with the script/business/data that these things rely on and so far, NONE of the scripts I've seen has any kind of error handling. It's been an adventure to say the least.


    Also, even if you are delivering an accde or mde file, the ERL numbers are still there and useable, you just have to add "ERL" into your error output somewhere. You obviously cant debug on those file types, but knowledge is power and such.

  11. #11
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Back to the question at hand.

    @vicsaccess

    Sorry to say "PrettyCode.Print for VB6/VBA" only number lines in the print out/report. It does not add line numbers to the actual code.
    But, I agree, the lines numbers could be useful.

    I don't use line numbers because it reminds me of MS BASIC/GW BASIC. And even though I numbered lines in increments of 10 (I should have used 100, but I was young and inexperienced), it was It was always a pain when having to renumber lines.

  12. #12
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    thanks guys.

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

Similar Threads

  1. Numbering
    By cfobare79 in forum Reports
    Replies: 3
    Last Post: 04-08-2015, 12:33 PM
  2. VBA Code Returning Error Run Time Error 3061
    By tgwacker in forum Access
    Replies: 2
    Last Post: 11-24-2013, 11:00 AM
  3. Replies: 1
    Last Post: 05-02-2013, 10:57 AM
  4. VB Code for Access DB for Inventory Tracking with FIFO
    By rao.gnaneswara in forum Programming
    Replies: 16
    Last Post: 01-19-2013, 11:59 PM
  5. Tracking values in Access reports in Code
    By dahcjohnson in forum Programming
    Replies: 3
    Last Post: 05-11-2012, 04:43 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