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

    New Database documentation


    Ok, this may be a question that gets a few giggles out of the individuals that program for a living since they have probably already learned this lesson the hard way, but I ran into a issue with writing my current DB code. I hadn't wrote the number of subs and functions all on one form up until this DB but i have just realized that i spent the last day and a half rewriting subs or functions that i thought i forgot to do and in fact they was there, but needed a little tweeking to get them to work, wasted time. So basicly my question is how do you keep track of what you have wrote and what it is suppose to handle? I have stopped working forward and have started a text file listing each sub or function, its purpose and what sub, function or action calls it.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    just documentation within the module - you see it all the time from the 'good' code snippet sites. I also group functions and subs into different modules depending on what they do - mouse events, file handling, error handling, look and feel, db security etc.

    Code:
    Option Compare Database
    Option Explicit
    
    'this module contains subs and functions handling mouse events
    'has been adapted for 64bit systems
    'references modules x, y and z
    'requires reference library a
    
    
    and then within functions and subs an explanation of what it does, why and an example of how to call it
    I don't bother noting which forms, modules etc use the functions and subs - if I want to know that, I can do a find.

    Also when creating forms etc, before writing code I think 'is this something I could use somewhere else?' if so then I put into a module (often prexexisting these days) and try to design so I can just put the function name in the event - which potentially means no code in the form and a faster load time.

    As time goes on, you sometimes find you have several similar functions - this may be a necessity or with a bit of work they can be combined into one.

  3. #3
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Thank You Ajax, i appreciate your input, i have been doing what i thought was a good job of documentation within the modules but I learned the hard way i wasn't doing a good enough job with my descriptions. i may be going overboard with my extra documentation of its purpose and what sub, function or action calls it is probably over kill but for now it will ensure that i keep it straight and if anyone comes behind me looking at the code it should be fairly easy to identify. on another note, thanks for the second personal use of the find feature. Honestly when i started studing Access i remember reading about the find feature but did not think it was that important at the time so i kept mentally moving forward. I had to go back and reread how to use it but seriously you just saved me alot of headace from where i had renamed some of my subs and functions to make them a little better descriptive. My plan was to just start the code and replace them as I came up with errors, i just used the find method and did it all in a matter of 5 minutes. Thank You.

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

Similar Threads

  1. question | ribbon UI documentation
    By mikichi in forum Access
    Replies: 5
    Last Post: 01-05-2014, 10:53 AM
  2. SQL Server Views documentation
    By RayMilhon in forum SQL Server
    Replies: 0
    Last Post: 09-04-2013, 11:35 AM
  3. ADO API documentation. Where?
    By graffiti in forum Access
    Replies: 1
    Last Post: 01-14-2012, 12:26 AM
  4. VBA Syntax Documentation
    By MDB in forum Programming
    Replies: 4
    Last Post: 08-30-2011, 09:37 AM
  5. Need Documentation
    By umair in forum Access
    Replies: 1
    Last Post: 02-17-2010, 08:56 AM

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