UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Closed TopicStart new topic
> How To ... Organize Code and other Reference Info    
 
   
strive4peace
post Dec 13 2007, 06:30 AM
Post#1


strive4peace
Posts: 20,385
Joined: 10-January 04



Here is a tip to organize code or SQL or instructions or links (etc) that you write or get from other sources:
ach 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.
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)
For example, here might be a few of your filenames:
code_NotInList.txt
code_FindRecord.txt
tip_DebugCompile.txt
tip_WindowsDefaults.txt
sql_Syntax.txt
help_FormatCodes_DateTime.txt
step_ DocumentingADatabase.txt
UA_CodeTags.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.
THere are some prefix examples:
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
If you are not sure how you might search, use the filename to specify multiple search terms.
code_LastDateOfMonth_DaysInMonth_EOM.txt
code_CreateDates_FillComboWithDayOfWeek_DOW.txt
(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
--------------------------
12-6-07
Some rather basic use of relationships -- Mainform/Subform
http://www.utteraccess.com/forums/showflat...;Number=1551226
--------------------------
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:
code_CloseOpenForms_ArvinMeyer.txt
code_PrinterEscapeSequence_datAdrenaline.txt
code_hideNavigationPane_2007_JohnViescas.txt
link_Access2007_JeffConrad.txt
link_Performance_mishej.txt
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)
http://www.utteraccess.com/forums/showflat...;Number=1406383
--------------------------
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:
code_API_OpenFile_CommonDialog_KenGetz_mvps.txt
The link is there too, but if you also copy the code for yourself, it is convenient to name it starting with 'code_'
~~~~~~~~~~~~~~~
Oalso have a document with basic links that I give out often (like the Access Basics document posted in the Tutorials forum and Allen Browne's reserved word list) -- but I keep this short or it would be faster to use the Windows search <smile>
~~~~~~~~~~~~~~~
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 wink.gif
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th December 2017 - 05:21 PM