Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - ALPHABETICAL INDEX TO SAMPLES
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

>
Want a good read? Try The Summer of His Life (available on Amazon!)

ALPHABETICAL INDEX TO SAMPLES

 Post Reply Post Reply
Author
Message Reverse Sort Order
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (1) Thanks(1)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: ALPHABETICAL INDEX TO SAMPLES
    Posted: 14 Jul 2008 at 11:09pm
The follow is a compendium of Access routines, each separated into its own database. Each database illustrates one or more possible solutions to a single problem. They are not intended to be fully functioning utilities, but rather an illustration of how the problem might be solved and are therefore intended for educational use. These routines are entirely free. You may use them anywhere and in any way you choose, with or without citation. Therefore, you agree to use them at your own risk.  There is no warranty implied and I am not responsible for any damages that might result from their use.

 Note: Files designated "Access 2000 DAO" use the DAO data model and require a reference to DAO set in Access versions 2000 and 2002 (XP). Files designated "Access 2000 ADO" do not require this reference, but may need a reference to ADOX set. Files designated "Access 2000" do not use a data model.

 If you don't understand the above, or are having problems with User Defined Variables, Click Here

 A

B
  • BackUpWithCompact.mdb ( intermediate )
    This sample illustrates how to back up a database using the Compact Method. It creates a backup file called "BackUpWithCompact2kXX_XX_XXXX.mdb" with the X's representing the data. It puts this file in the same directory as the database.
  • BeginDateEndDateQuery.mdb (beginner)
    This sample illustrates how to create a  query which displays the BeginDate and EndDate of a range based on a single EffectiveDate stored in the table.  It is assumed that the Effective Date range of a record spans the time from the Effective date of the current record and the Effective Date of the NEXT record (minus 1).  There are three methods shown here: Using a 1) correlated subquery, 2) DMax domain aggregate function, and 3) LEFT OUTER JOIN.
  • BoilerPlate.mdb ( intermediate )
    This sample is a useful template for an application.
  • BoilerPlate2.mdb ( intermediate )
    This sample is a useful template for an application. It is mostly the same as Boilerplate.mdb but with a different MainDataEntry Form.
    Books.mdb ( intermediate )
    "Books.mdb" and it's companion database "Books_be.mdb", make up a simple personal book inventory database. It uses the "BoilerPlate.mdb" sample to create a complete application.
C

D
  • DAO.mdb ( beginner )
    This database contains various examples of Data Definition Language (DDL) and Data Manipulation Language (DML) of both DAO and SQL.
  • Data Definition Language: SQL vs DAO
    This sample (with full documentation) illustrates how to do a variety of DDL (Data Definition Language) operations using both SQL and DAO.  DDL operations are those that modify the database structure, ie. tables, fields, indexes, and relationships.
  • DataEntryMask.mdb ( beginner )
    This sample illustrates a way to restrict what kind of characters are input into a textbox without using an input mask. This method checks the characters as they are typed and only allows legal characters.
  • DataScramble.mdb ( intermediate )
    This application illustrates how to scramble data in a table for confidentiality reasons. To scramble Text data WITHIN A FIELD, see my sample CharacterScramble.mdb
  • DateStuff.mdb ( intermediate )
    This example illustrates how to do a variety of date calculations like: First day of Month, Last Day of Month, First Day of Next Month, First Day of Current Week, Last Day of Current Week, First Day of Current Work Week, Last Day of Current Work Week.
  • DaysBetweenQuery.mdb ( beginner )
    This sample illustrates how to create a "Days Between" query, that is, display the difference between dates in subsquent records of a table.
  • DeleteTablesAtStart.mdb ( beginner )
    This sample illustrates how to delete ImportError tables at start up. For illustration purposes, the RunMacro button executes the code, but if you rename the macro to AutoExec, it will run each time the database opens.
  • Denormalize.mdb ( intermediate )
    This example takes data in a normalized table and writes it to another table in denormalized form.
  • DirectoryList.mdb ( intermediate )
    This sample shows how to "role your own" directory/file list.
E
  • EmailingSpecificReports.mdb ( advanced )
    This illustrates how to email the same report with different data to a variety of users.
  • ERMaster.ppt 
    Not an Access sample, but a useful Powerpoint template for creating ER Diagrams.
  • ExportFormattedFixed.MDB ( intermediate )
    This shows how to export to a fixed width text file programmatically.
  • ExportToExcel_Automation (advanced)
    • There are two ways of using Office Automation that I want to discuss:
      1. Using a Do…While loop to PUSH data from Access to Excel
      2. Using the CopyFromRecordset to PULL data into Excel from Access
  • ExportToExcel_TransferSpreadsheet
    This sample demonstrates how to append data from a database to an Excel Spreadsheet.
    • The overall process:
    • 1) Create macro to export queries
    • 2) Convert the macro to VBA code
    • 3) Modify the code to loop through a table of table and file names (MyExport)
    • Look in the "basExport_TransferSpreadsheet" module for the relevant code.
  • ExportToExcel.mdb ( intermediate )
    This sample demonstrates how to export data from a database using the TransferSpreadsheet method, but have the data populate a formatted spreadsheet. The trick here is to export the data to a NEW tab in the Excel workbook and link the fields from the new tab into the formatted spreadsheet.
  • ExportToExcelCharts.mdb ( intermediate )
    Sample with Documentation. This sample demonstrates how to export data from a database using the TransferSpreadsheet method, but have the data populate a Chart. The trick here is to export the data to a NEW tab in the Excel workbook and link the fields from the new tab into the chart.
  • ExpressionEvaluation.mdb ( intermediate )
    This form illustrates how to make a pop-up dialog to calculate values to put into a field on a form.
F
  • FlatFileDemo.mdb ( beginner )
    This example illustrates some of the difficulties inherent in bad (non-normalized) database design and how they can be corrected. It is not a formal tutorial on Normalization, rather it is a series of examples which allow you to demonstrate the kind of trouble that a non-normalized can produce. I use this example in my classes as an introduction to why you would want to normalize a database design.
  • FormSubform.mdb ( beginner )
    This form illustrates how to use Domain functions to do a variety of tasks in a Form/Subform situation.
G
  • GetPathFileName.mdb ( intermediate )
    This form shows how to extract just the Path or just the File name from the db.Name property.
  • Greenbar.mdb ( beginner )
    This sample illustrates how to make your report a "greenbar" report, that is one that has alternating lines of color. Check behind the individual reports for the relevant code.
H
  • HasContinued.mdb ( intermediate )
    This example illustrates two methods of how to work around the 'HasContinued' bug, so that you can get a 'Continued' status for group headers within a report.
I
  • ImplementingM2MRelationship.mdb ( beginner )
    This example illustrates two different methods of implementing in a form a Many-to-Many relationship that has been resolved by a linking table.
  • ImportHTML.mdb ( intermediate )
    This sample illustrates how to use the LineInput statement to import text from a text file in an extremely unconventional format. The file is an HTML file, and the code searchs for the HTML tags to find specific information and puts that in a field.
  • ImportLineInput.mdb ( intermediate )
    This sample illustrates how to use the LineInput statement to import text from a text file with a mixed format. Each line of the file is a separate record, but is delimited in a variety of ways.
  • ImportSpreadsheet.mdb ( intermediate )
    This sample illustrates 3 things: 1) How to back up a database using the Compact Method, 2) Create a native Access 2000 table from a linked Excel table 3) Import data to an existing table.
  • ImportToTempDatabase.mdb ( intermediate )
    This illustrates how to programmatically create a database to hold a temp table for updating.
  • ImproveFormPerformance.mdb ( intermediate )
    One way to improve the performance of a form that is bound to a LARGE dataset is to split the data into smaller chunks. This form uses the "Phonebook" method to do that. Click one of the 27 buttons at the top and the form will show you only those records in the table that start with the corresponding letter.
K
L
M
N
  • NoDataInReports.mdb ( beginner )
    This sample illustrates how to cancel a report that has no data in it, using the OnNoData event of the report.
  • NormalizeDenormalize.mdb ( intermediate )
    It illustrates how to take a table which has fields like Value1, Value2, Value3,... and writes them into a table which has one field (Value) with each of the values in a new record rather than having them all in one record.
  • NormalizingRepeatingColumns1 (beginner)
    Document Included
    This sample demonstrates how to normalize a simple PC_Inventory table.  Its purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.
  • NormalizingRepeatedColumns2 (beginner)
    Document IncludedThis sample demonstrates how to normalize a PC_Inventory table that has two sets of repeated columns.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.
  • NormalizingRepeatedColumns3 (beginner)
    Document IncludedThis sample demonstrates how to normalize a table that has repeated Yes/N0 columns.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.
  • NormalizingRepeatingColumnsVBA.mdb
    Document Included
    This sample demonstrates how to normalize a table that has repeated columns with VBA.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet with code rather than SQL statements. 
  • NotInList.mdb ( intermediate )
    This sample illustrates a variety of ways to use the NotInList event of a combo box.
  • NotInListAlternatives.mdb ( intermediate )
    This sample illustrates several methods other than Not In List to add new records to a combo box that is Limited to the List.
  • NumberedQuery.mdb ( beginner )
    Sample with Documentation. This sample illustrates two different ways to create a query with a sequenced number column.
  • NumberPad.mdb ( beginner )
    This sample shows how to create a number pad for inputting a Social Security Number.
O
  • OpenArgs.mdb ( intermediate )
    This application illustrates how to use OpenArgs to solve a variety of problems.
  • OrderListBox.mdb ( intermediate )
    This sample shows how to make a listbox reorder by clicking on the column header. It also shows how to use the same button to sort ASC or DESC
  • Ordinals.mdb ( intermediate )
    Ordinals are ordered numbers: 1st, 2nd, 3rd, 4th,...etc. This function shows how to add the correct suffix to any positive integer.
  • "Other"Problem.mdb ( advanced )
    This example shows one method of handling the situation where the user wants a combo box to pick from, but also wants to have an "Other" category where they can add free-text qualifying the "Other".
  • OutputText.mdb ( intermediate )
    This illustrates a simple way to precisely format data for text output.
P
R
S
  • SaveFileToSpecificDirectory.mdb ( intermediate )
    This sample shows how to use the Windows API to bring up the OpenSaveFile dialog box and save a file to a directory of your choosing.
  • SeekWithLinkedTable.mdb ( intermediate )
    It is usually said that the Seek method cannot be used with a linked table. This is true, it cannot. However, it WILL work if you open the table in the remote database explicitly with the OpenDatabase method. This sample illustrates how to do this.
  • SelfJoin.mdb ( intermediate )
    Demonstrates a number of ways to use a Self-Join in Access 97.
  • SetHyperlink.mdb ( intermediate )
    This sample allows the user to double-click on a control, browse to a file, and save the filename in a field in a table.
  • SetReferenceToDAO.mdb ( intermediate )
    This sample programmatically sets a reference to DAO (Microsoft DAO 3.6 Object Library) if it does not exist.
  • SettingLabels.mdb ( intermediate )
    This form gets the values of the labels from the Description of the Field in the table.
  • SigFigs.mdb ( beginner ) 
    This example illustrates how to round a number to a specified number of significant figures.
  • Snapshot.mdb (beginner)
    It is usually preferable NOT to store OLE objects like snapshots in the table itself. It causes massive database bloat. The usual solution is to store the snapshots as files on the hard drive and store the file name in the table. This sample demonstrates how to to this.
  • SQLDAOLoader.mdb ( advanced )
    This sample shows how to modify the structure of a Back-End database using SQL DDL (data definition language) statements and DAO code. This sample does much the same as "SQLLoader.mdb", but does not require text files to hold the SQL.
  • SQLLoader.mdb ( advanced )
    This sample shows how to modify the structure of a Back-End database using SQL DDL (data definition language) statements. The actual code is found in the Back-end database (SQLLoaderBE.mdb).
  • StringStuff.mdb ( intermediate )
    This sample illustrates a number of useful string functions. See the individual functions for details.
  • SubForm3Levels.mdb ( advanced )
    Access does not allow more than two levels of subforms. At times, however, your data model indicates the need for more levels. This is one way to implement a third level through the use of a list box.
  • SubformInContinuousForm.mdb ( beginner )
    The problem is that Access doesn't allow a subform to be embedded on a Continuous Form. The following is one solution.
  • SubformReference.mdb ( Beginner )
    This sample illustrates how to reference controls on subforms and subsubForms. It also illustrates how to set the focus to these controls.
  • SubQuery.mdb ( beginner )
    This sample illustrates how to use a Sub Query to return the Maximum value of a group and the values of the other fields associated with it.
  • SubQueryInFROM.mdb ( beginner )
    Demonstrates how to use a subquery in the FROM clause of a query.
  • SynchronizedSubforms.mdb (beginner)
    This sample illustrates how to keep two subforms synchronized with each other on a main form. The code that accomplishes this is behind the two subforms.
T
U
V
Y
  • YearsMonthsDays.mdb ( intermediate )
    A variety of functions created by different developer's to calculate the difference between two dates, which can also be used for Age Calculations. Some work in some situations and not in others. You'll have to decide which is best.
Z
  • Zip97.mdb ( intermediate )This sample was created before the advent of WinZip in an attempt to automate the compression process. It uses a DOS version of PKZIP an Zip2Exe. It will also create an self-extracting zip file.
Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links
>
Want a good read? Try The Summer of His Life (available on Amazon!)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.