Results 1 to 6 of 6
  1. #1
    Noob's Avatar
    Noob is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2016
    Posts
    36

    Question How do you store your useful code? [Best Practice]

    Hi,

    In Excel I was told to make a PERSONAL workbook to store my useful code in for reuse. I have found that to be a great habit to get into. Now after doing that for years I have some code in there for just about anything & it has saved my bacon more than a few times. I am relatively new to Access, but beginning to write some useful code that could come in handy in the future. I did a quick search on Google & didn’t come-up with anything useful, so I figured why not ask the great folks here. What do you do to store your old Access code that can/will be useful in the future?

    TIA



    P.S. I am only on Chapter 3 of the Access 2010 Bible & haven't seen any mention of a PRESONAL DB. Maybe I am not deep enough into the book/bible just yet & it is forthcoming. If so I apologize for asking such a Noob question.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You can explore the module to a file.
    but I also keep an access db of all my tools.

  3. #3
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I use MZ Tools, which has a code template feature. If I need a DAO recordset loop, the template code is a right-click away. I have 15-20 frequently used templates stored. It also has an error handler template, so adding error handling to any function/sub is a right-click away.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Noob's Avatar
    Noob is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2016
    Posts
    36
    Thanks a lot guys for taking the time to read & reply. Thanks for the good advice I am going to play around with what’s been suggested & see what I come-up with.

    Please feel free to continue share your processes or methods if they differ from the above mentioned. I am still curious. Plus this might be exactly what someone else is looking for in the future too.

    TIA (Thanks in advance (My wife asked me what TIA was so... (lol...)))

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    I have some common routines that I frequently use in all databases I develop. I keep then all in a module named basUniversal in a database I call Universal. The module can be copied to new databases in a couple of clicks using the ribbon 'External Data'. This is kind of like the Excel Personal workbook.

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I have a table with 3 fields:
    Purpose - text - Purpose of code
    Keyword - text (easier to search)
    Code - Memo - the code.

    A form to view, add and/or edit

    Find the code, copy, then paste...............

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

Similar Threads

  1. Best Practice Guidance
    By dpick in forum Access
    Replies: 2
    Last Post: 02-26-2016, 02:25 PM
  2. Replies: 6
    Last Post: 02-25-2016, 09:07 AM
  3. Replies: 9
    Last Post: 04-01-2014, 05:06 PM
  4. Code to store a value in table where ID = X
    By iProRyan in forum Access
    Replies: 9
    Last Post: 03-21-2014, 11:17 PM
  5. Best practice?
    By thekruser in forum Queries
    Replies: 2
    Last Post: 09-20-2010, 09:41 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