Register  Login
Snippets & Tips
***NEW CUSTOMER OFFER***
Get 15 minutes of free Live Help!
Coupon Code: 20110729  
Live Help
Search Snippets & Tips Minimize
  

Notes

Some operating systems block files that come from other computers.  If you cannot get a downloaded file to work properly, right-click over the file, select the Properties option, and then click the Unblock button at the bottom of the General tab.

  

View Code Snippets & Tips Minimize
Author: Extra Mile Data Created: 3/10/2009 2:35 PM
Code snippets for Microsoft Access and Visual Basic for Applications.

If you've ever wished you could keep the Office Ribbon, but automatically minimize it to conserve space, this VBA function is for you.  The same technique works for Microsoft Access, Microsoft Word, etc.

Read More »

If you've ever imported a text file or a Microsoft Excel worksheet into Microsoft Access, you have seen how Access defaults the text field lengths to 255 characters.  This VBA function will display the maximum length of the values currently in each field of a table so that you can decide how to correctly set the field lengths.  It also shows the data type of each field.

Read More »

This example shows how to use a command line switch and a scheduled task to start a Microsoft Access application unattended and run some logic automatically.

Read More »

This VBA function copies or imports all the objects and database startup properties from a Microsoft Access replicated database into an un-replicated database.  It removes tablename_Conflict tables and removes replication-related fields like s_GUID, etc.

Read More »

This function uses a combination of Microsoft Access, VBA, and Microsoft Excel to transfer the values from an Access form in PivotTable view to the clipboard.  It is a good example of automation using late binding.

Read More »

This VBA function looks for duplicate values in an array.  If it finds some, it produces a list of the duplicated values.  It is a good example of how to loop through an array.

Read More »

This VBA function opens/gets a MS Word document and finds the next occurrence of a specific string. The function provides a good example of using late binding automation and the AppActivate() function.

Read More »

This set of VBA functions and MS Access example show how to use code to fill a list box, clear a list box, and retrieve selected items from a list box.

Read More »

This VBA function returns the number of weeks that one date is away from another, in whole weeks. For example, any date in the third week from the starting date will return a value of 3.

Read More »

This VBA function uses the Randomize() and Rnd() functions to generate a random string of characters with a specific length.  The included Microsoft Access example applies the function to a simple form that can be used to create a password.

Read More »

This set of procedures can be used in Microsoft Access to collect messages during a process to display to the user after the process is complete.  It provides a good example of how to use collections in VBA.

Read More »

This VBA function passes back the last date that a particular weekday occurred.

Read More »

This VBA procedure converts a number, in yyyymmdd format, to a regular date like mm/dd/yyyy.  For example, a number like 20090427 will get converted to 4/27/2009.

Read More »

This VBA procedure shows you how to create a simple list of the objects in a Microsoft Access database.  The list it creates includes the object type, object name, and object description, which can be parsed using the Excel file in the download.

Read More »

Need to get a count of the number of columns in the results of a MS Access query that are not Null?  This VBA code will do it.

Read More »

There are very sophisticated search programs to help you find occurrences of an object name or a piece of code within a MS Access database.  I usually find that this VBA code is sufficient to do the job.  It looks in tables, queries, code modules, form and report modules, record sources for forms and reports, and control sources for controls.  These procedures are also good examples of how to enumerate through collections of Access objects.

Read More »

  

Extra Mile Data - Go Faster...Go Further!

Go Faster...Go Further!  Call (479) 524-8479.
Extra Mile Data, your source for Microsoft Access help

Terms Of Use | Privacy Statement | © 2003-2012 Extra Mile Data