Skip to content

🅰️Various examples of VBA, queries, macros, forms, reports and ribbon XML in an Microsoft Access database file

License

NotificationsYou must be signed in to change notification settings

Access-projects/Access-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Access Examples

Various examples of VBA, queries, macros, forms, reports and ribbon XML in an Microsoft Access database file

License: MITcurrent_build Office_2016Latest ReleaseGithub commits (since latest release)GitHub issues

Table of Contents

References

LinkType
Microsoft Access Find & Replace Add-inSoftware
Microsoft Access Merge & DiffSoftware
O'Reilly Access Database Design & Programming, 3rd EditionBook

Command Line Options

OPTIONDESCRIPTION
/decompileUndocumented command line. Will sometimes remove old code and objects from the database and make it faster.
/exclOpens the specified Access database for exclusive access. To open the database for shared access in a multiuser environment, omit this option. Applies to Access databases only.
/roOpens the specified Access database or Access project for read-only access.
/user user nameStarts Access by using the specified user name. Applies to Access databases only.
/pwd passwordStarts Access by using the specified password. Applies to Access databases only.
/profile user profileStarts Access by using the options in the specified user profile instead of the standard Windows Registry settings created when you installed Microsoft Access. This replaces the /ini option used in versions of Microsoft Access prior to Access 97 to specif
/compact target database or target Access projectCompacts and repairs the Access database, or compacts the Access project that was specified before the /compact option, and then closes Access. If you omit a target file name following the /compact option, the file is compacted to the original name and fo
/repairRepairs the Access database that was specified before the /repair option, and then closes Microsoft Access. In Microsoft Access 2000 or later, compact and repair functionality is combined under /compact. The /repair option is supported for backward compat
/convert target databaseConverts a previous-version Access database or Access project to the default file format, renames the new file, and then closes Access. You must specify the source database before you use the /convert option. To view the default file format, click Options
/x macroStarts Access and runs the specified macro. Another way to run a macro when you open a database is to use an AutoExec macro.
/cmdSpecifies that what follows on the command line is the value that will be returned by the Command function. This option must be the last option on the command line. You can use a semicolon (;) as an alternative to /cmd. Use this option to specify a comma
/nostartupStarts Access without displaying the task pane (the second dialog box that you see when you start Access).
/wrkgrp workgroup information fileStarts Access by using the specified workgroup information file. Applies to Access databases only.

C:\Program Files\Access 2K Runtime\Office\MSACCESS.EXE P:\general\Database\Facilities_Management_System\v_11_1\FMS.mde /user username /pwd /wrkgrp P:\gene

/runtimeStarts Access in runtime mode for testing. C:\Program Files\Office\MSACCESS.EXE C:\Database\database.mde /runtime



Object Listing Reference

TypeNbrNameDescriptionItems
Form (-32768)
1001_About_frmA description of the Microsoft Access Database.
2002_Splash_Screen_frmA splash screen with the company logo and the application information.
3003_Buttons_frmCommand Button example with code
4004_DSN_Password_frmA form to login to a DSN database connection
5005_Access_Security_frmAllow the user to login, change password, edit permission; where granted, and view list of current users.
6006_Dialogbox_Examples_frmDialog box examples
7010_Date_Calendar_frmUses the calendar dll from Microsoft (only needed previous to 2007)
8301_Roulette_frmRoulette game
9700_Create_Filelist_frmRecursive code to go through complete folder structure and catalog a file list
10800_Link_Manager_frmManage the links from server objects
11900_Check_Runtime_frmCheck performance of queries and reports
12950_Leszynski_Conventions_frmLeszynski Naming Conventions for Microsoft Solution Developers
13980_Data_Dictionary_frmA form that documents the columns, column descriptions, and the rest of the attributes of each table within the database whether the table is a Access or Server based.
Macro (-32766)
1AutoKeysHot Key designation
2RibbonAccess 2007-2016 Ribbon example
Report (-32764)
1001_Organization_Logo_srpPrimary company logo.
2099_Object_Listing_Report_rptA listing of all the objects within the database
3803_Object_Calendar_List_rptA calendar style report
4803a_Calendar_List_srpA sub-report to 803_Object_Calendar_List_rpt
5804_Weekly_Report_rptA 52 week style report
6805_Timeline_Report_rptA MS Project like time line report example
7950_Leszynski_Conventions_rptLeszynski Naming Conventions for Microsoft Solution Developers
8980_Data_Dictionary_rptA data dictionary listing of all the tables in this database
Module (-32761)
1clsMonthCalCalendar ClassCreateDTPControl
ReDraw
MultiSelect
MaxSelectRangeofDays
CalendarYOffset
MonthRows
MonthColumns
WindowLocation
PositionAtCursor
CursorXinit
CursorX
CursorY
FontSize
FontName
ShowWeekNumbers
NoTodayCircle
NoToday
hwnd hWndForm
hWndCal
OneClick
SelectedDate
SetSelectedDateRange
StartSelectedDate
EndSelectedDate
GetSelectedDates
SetViewableMonths
SetBoldDayState
Class_Initialize
Class_Terminate
GetProperty
SetProperty
IsCalendar
2modCalendarCalendar FunctionsShowMonthCalendar
WindowProc
GetFuncPtr
SetSelectedDate
SetMonths
sClick
ShowWeekNums
sShowToday
sShowcircleToday
sWindowPosition
UpdateCursor
LocationCursorOnCalendar
ReleaseClass
LoWord
MakeDWord
3modDateDate functionsTimedelay
DaysInMonth
Age
DaysInMonthMS
DaysInMonth2
EndOfMonth
EndOfWeek
FormatInterval
LastBusDay
LeapYear2
NextDay
NextDay1
Num2Date
PriorDay
PriorDay1
StartOfMonth
StartOfWeek
String2Date
WorkDays
4modFileFunctionsContains procedures that check and refresh the links to Northwind tables.RefreshLinks
GetDirectory
FindFile
ReturnAllFiles
RecursiveDir
TrailingSlash
MSA_CreateFilterString
MSA_ConvertFilterString
MSA_GetSaveFileName
MSA_SimpleGetSaveFileName
MSA_GetOpenFileName
MSA_SimpleGetOpenFileName
OF_to_MSAOF
MSAOF_to_OF
5modMainSubroutines that run objects and procedures in the databaseOSUserID
ErrorMsg
GetObjectDescription
GetObjectTypeName
6modMathAreaVolumeArea and VolumeACircle
ARect
ARing
ASphere
ASquare
ASquare2
ATrap
ATriangle2
RectDiag
SquareDiag
VCone
VCylinder
VPipe
VPyramid
VTruncPyramid
7modMathCumulativeCumulative ValueCumulativeValue
DeCumulativeValue
8modMathStatisticsStatisticsCombin
Factorial
FactorialR
Permut
Regress
TestRegress
9modMathTrigTrigonometryArcCos
Arccosec
Arccotan
ArcSec
ArcSin
ATan2
Cotan
Deg2Rad
HArccos
HArccosec
HArcsec
HArcsin
HArctan
HCos
HCosec
HSec
HSin
HTan
pi
Rad2Deg
Sec
10modMathXYZLatitude/LongitudeDegToDMS
DegToDMSStr
DMSStrToDeg
DMSToDeg
GreatArcDistance
LatLongToXYZ
testxyz
XYZToLatLong
11modOutlookMicrosoft Outlook FunctionsImportContactsFromOutlook
ImportCalendarFromOutlook
PushAppointments
12modStringString Manipulation/ParsingLowerCC
ParseCSZ
ParseName
Proper
ProperEx
ProperWord
StrToHex
TestParseName
UpperCC
CountCSVWords
CountWords
CutFirstWord
CutLastWord
ReplaceStr
GetCSVWord
GetWord
Like2
LPad
ParseItemsToArray
RPad
ParseArticle
Access Table (1)
1CMD_LINE_TBCommand line options for Access
2CUM_VAL_TBUsed to test the function in modMathCumulative
3DATABASE_STRUCTURE_TBUsed to store the database table structure
4DECUM_VAL_TBUsed to test the function in modMathCumulative
5ROULETTE_TBNumbers for roulette
6TAG_GRP_TBLeszynski Naming Conventions for Microsoft Solution Developers
7TAG_NME_TBLeszynski Naming Conventions for Microsoft Solution Developers
8tblContactsUsed with the Microsoft Outlook Functions
9tblDefaultsUsed to store defaults used in the this database
10tblFileListUsed to store a list of files
11USysRibbonsMicrosoft Access Ribbon XML example
Query (5)
1101_Object_List_qryCreates a list of all objects in the MS Access database (Needs module modMain)
2200_Create_DATABASE_STRUCTURE_TB_qryUsed to create the MS Access table using DDL
3201_Create_DATABASE_STRUCTURE_TB_qryUsed to create the MS Access table using DDL
4202_Add_Constraint_pk001_Primary_Key_PROP_ID_qryUsed to add a constraint to a MS Access table using DDL
5203_Add_Column_LST_MDFD_ID_qryUsed to add a new column to a MS Access table using DDL
6204_Alter_Column_LST_MDFD_ID_qryUsed to alter a column in a MS Access table using DDL
7205_Drop_DATABASE_STRUCTURE_TB_qryUsed to drop a MS Access table using DDL
8720_Cumulative_Value_qryUsed to test the function in modMathCumulative
9721_Decumulative_Value_qryUsed to test the function in modMathCumulative
10803_Calendar_Style_Listing_qryUsed in the report 803_Object_Calendar_List_rpt
11803a_Calendar_List_qryUsed in the sub-report 803a_Calendar_List_srp
12804_Weekly_Report_qryUsed in the report 804_Weekly_Report
13940_Date_Format_qryExamples of formating date & time
14950_Leszynski_Conventions_qryLeszynski Naming Conventions for Microsoft Solution Developers
15SQL_Server_Function_Login_Name_qrySQL Server pass-through query
16SQL_Server_View_Date_Time_qrySQL Server pass-through query

About

🅰️Various examples of VBA, queries, macros, forms, reports and ribbon XML in an Microsoft Access database file

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published