UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Organize Code and Reference Info    
Organize Code and Reference Info

Image:NotifCleanup.gif This page requires general cleanup in formatting or text to better fit the UA Wiki Guidelines

Here is a tip to organize code or SQL or instructions or links (etc) that you write or get from other sources:
Each time you write something that you think would be useful at a later date for yourself or to help someone, use NotePad to save it as a text file.


How to Save to Notepad

To put NotePad on your Start button:

1. click Start
2. choose --> All Programs, Accessories
3. Highlight NotePad
4. hold down the CTRL key while you drag it to your Start button and place it in the list
(make sure you are still holding CTRL when you let go of the mouse to make a copy)

Sample File Names

For example, here might be a few of your filenames:

step_ DocumentingADatabase.txt

Both FindRecord and NotInList need to be changed for the circumstances they are being used, but at least you have shell code to build around. In my FindRecord file, I have code that goes behind the form at the top since that is easiest to understand and what I most often give to other people. I also have a generic function that takes parameters and goes into a standard module that is below the first procedure. I also put the instructions to give the user in the text file.

Here are some prefix examples:

bas -- VBA code module
cls -- VBA class code module (ie: code behind a form or report)
code -- contains code
db -- has a database attachment you can download
dfn -- definition
eqn - equation
help -- from the Application help
idea -- something you want to write more about later
link -- link
sql -- SQL syntax
step -- numbered steps to do something
tip -- has instructions
UA -- information specific to UtterAccess
bas -- code module

Using Filename to Search

If you are not sure how you might search, use the filename to specify multiple search terms.


(This might be instructions on creating a Dates table and code to create date records for 20 or so years,
and then instructions to fill a combo box with all dates for a particular day of the week, like all the Tuesdays)

If you open one of the text files to give the information to someone else, after you submit the post and it renders on the screen, copy the post link, subject, and date to the top of your text file. If the post is on UtterAccess, copy the URL (Uniform Resource Locator) from the AddressBar of your browser window and truncate all the information after the number.
For instance:

filename --> link_MainformSubform.txt
Some rather basic use of relationships -- Mainform/Subform
"http://www.utteraccess.com/forum/enter-live-mail-addre-t1437894.html&mode=flat#entry1438041" [[1]]

When someone posts code or SQL or a link that you know will be a good reference, make a note of (1) the link (2) a title (3) who wrote it and, once again, save text files.
For example:


Using Windows Search Facility

When you want to find your help, use the Windows search facility.
For instance, you might be looking for something on how to send printer escape sequences and you remember that datAdrenaline (Brent) wrote it.

Right-click on the top level directory in Windows Explorer (or My Computer) and choose --> Search

All or part of the filename --> *print*_dat* to find --> code_PrinterEscapeSequence_datAdrenaline.txt

With the title and a link at the top of the document, you can just copy and paste for others. For example,

sending hex code to printer ... windows default printer, by datAdrenaline (Brent)
Hex Code Send to Printer

If you know you have a file that covers the information you are looking for but you cannot remember your search terms, search 'A Word or phrase in the file' -- and then when you find it, rename the file to include what you originally used to try to find it by searching on the name.

If a site has some good code (two examples are mvps.org and AllenBrowne.com, I save things like this:


The link is there too, but if you also copy the code for yourself, it is convenient to name it starting with 'code_'

I also have a document with basic links that I give out often Access Basics Tutorial and Allen Browne's reserved word list -- but I keep this short or it would be faster to use the Windows search.

You can also keep all your Access code in a database and reference it in all your applications ... but I like using TXT files because not everything is code.

You might have code/info for other applications as well, like Excel, Word, and PowerPoint. Create folders for each application and put the text files under the application folder. Within an application folder, you may create several more folders under them (such as code written for specific versions, or stuff written by other UA members) -- and when you search, start at the top level directory for that application.

The TXT file thing works real well for me (and I update them) so, like an engineer, I think, why fix it if it isn't broken?

Hope this information helps you get organized

This page was originally ported from the UtterAccess Forums. It is based heavily or in part on a post by strive4peace.
How To ... Organize Code and other Reference info

Edit Discussion
Custom Search

Thank you for your support!
This page has been accessed 12,262 times.  This page was last modified 04:50, 5 February 2012 by Jack Leach. Contributions by Strive4peace, strive4peace2010 and Cpetermann  Disclaimers