100% found this document useful (2 votes)
21 views

(Ebook) Microsoft Access VBA Programming for the Absolute Beginner by Michael Vine ISBN 9781592007233, 1592007236 download

The document is a promotional listing for various programming ebooks, primarily focusing on Microsoft Access and VBA programming for beginners, authored by Michael Vine and others. It includes links to download these ebooks and provides ISBN information for each title. Additionally, it features acknowledgments and an overview of the author's background and expertise in programming education.

Uploaded by

lawieijasso2q
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
21 views

(Ebook) Microsoft Access VBA Programming for the Absolute Beginner by Michael Vine ISBN 9781592007233, 1592007236 download

The document is a promotional listing for various programming ebooks, primarily focusing on Microsoft Access and VBA programming for beginners, authored by Michael Vine and others. It includes links to download these ebooks and provides ISBN information for each title. Additionally, it features acknowledgments and an overview of the author's background and expertise in programming education.

Uploaded by

lawieijasso2q
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

(Ebook) Microsoft Access VBA Programming for the

Absolute Beginner by Michael Vine ISBN


9781592007233, 1592007236 download

https://ebooknice.com/product/microsoft-access-vba-programming-
for-the-absolute-beginner-4114398

Explore and download more ebooks at ebooknice.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

(Ebook) Microsoft Access VBA programming for the absolute beginner by


Michael (Michael Vine) Vine ISBN 9781598633931, 9781598637540,
1598633937, 1598637541

https://ebooknice.com/product/microsoft-access-vba-programming-for-
the-absolute-beginner-1082680

(Ebook) Microsoft Excel VBA programming for the absolute beginner by


Duane Birnbaum, Michael Vine ISBN 9781598633948, 1598633945

https://ebooknice.com/product/microsoft-excel-vba-programming-for-the-
absolute-beginner-1076772

(Ebook) C Programming for the Absolute Beginner by Michael Vine ISBN


9781598634808, 1598634801

https://ebooknice.com/product/c-programming-for-the-absolute-
beginner-1101712

(Ebook) Visual Basic Programming for the Absolute Beginner by Michael


Vine ISBN 9780761535539, 0761535535

https://ebooknice.com/product/visual-basic-programming-for-the-
absolute-beginner-984280
(Ebook) Microsoft Excel VBA Programming for the Absolute Beginner,
Second Edition by Duane Birnbaum ISBN 9781592007295, 1592007295

https://ebooknice.com/product/microsoft-excel-vba-programming-for-the-
absolute-beginner-second-edition-1274770

(Ebook) C Programming for the Absolute Beginner by Keith Davenport,


Michael Vine ISBN 9781305273764, 1305273761, 2014945699

https://ebooknice.com/product/c-programming-for-the-absolute-
beginner-33554976

(Ebook) Microsoft Windows PowerShell 2.0 programming for the absolute


beginner by Jerry Lee Ford; Microsoft Corporation ISBN 9781435454439,
143545443X

https://ebooknice.com/product/microsoft-windows-
powershell-2-0-programming-for-the-absolute-beginner-4104588

(Ebook) Microsoft C# Programming for the Absolute Beginner by Andy


Harris ISBN 9780585439532, 9781931841160, 0585439532, 1931841160

https://ebooknice.com/product/microsoft-c-programming-for-the-
absolute-beginner-2010738

(Ebook) Microsoft Visual Basic .NET Programming for the Absolute


Beginner by Jonathan S. Harbour ISBN 9781592000029, 1592000029

https://ebooknice.com/product/microsoft-visual-basic-net-programming-
for-the-absolute-beginner-1539006
Microsoft Access
®

VBA Programming
for the Absolute
Beginner
Second Edition

MICHAEL VINE
© 2005 by Thomson Course Technology PTR. All rights reserved. No Publisher and GM of Course PTR:
part of this book may be reproduced or transmitted in any form or by Stacy L. Hiquet
any means, electronic or mechanical, including photocopying, record-
Associate Director of Marketing:
ing, or by any information storage or retrieval system without written
Sarah O’Donnell
permission from Thomson Course Technology PTR, except for the
inclusion of brief quotations in a review. Marketing
g Manager:
Heather Hurley
The Premier Press and Thomson Course Technology PTR logo and related
trade dress are trademarks of Thomson Course Technology PTR and Manager of Editorial Services:
may not be used without written permission. Heather Talbot
Microsoft and Access 2003 are registered trademarks of Microsoft Cor- Acquisitions Editor:
poration in the United States and/or other countries. Mitzi Koontz
All other trademarks are the property of their respective owners. Senior Editor:
Mark Garvey
Important: Thomson Course Technology PTR cannot provide software
support. Please contact the appropriate software manufacturer’s tech- Marketing Coordinator:
nical support line or Web site for assistance. Jordan Casey
Thomson Course Technology PTR and the author have attempted Project Editor:
throughout this book to distinguish proprietary trademarks from Scott Harris/Argosy Publishing
descriptive terms by following the capitalization style used by the man-
ufacturer. Technical Reviewer:
Eric Olson
Information contained in this book has been obtained by Thomson
Course Technology PTR from sources believed to be reliable. However, PTR Editorial Services Coordinator:
because of the possibility of human or mechanical error by our Elizabeth Furbish
sources, Thomson Course Technology PTR, or others, the Publisher Copy Editor:
does not guarantee the accuracy, adequacy, or completeness of any Tonya Cupp
information and is not responsible for any errors or omissions or the
results obtained from use of such information. Readers should be par- Interior Layout Tech:
ticularly aware of the fact that the Internet is an ever-changing entity. Shawn Morningstar
Some facts may have changed since this book went to press.
Cover Designer:
Educational facilities, companies, and organizations interested in mul- Mike Tanamachi
tiple copies or licensing of this book should contact the publisher for
CD-ROM Producer:
quantity discount information. Training manuals, CD-ROMs, and por-
Keith Davenport
tions of this book are also available individually or can be tailored for
specific needs. Indexer:
Nancy Fulton
ISBN: 1-59200-723-6
Library of Congress Catalog Card Number: 2004114910 Proofreader:
Printed in the United States of America Jan Cocker
05 06 07 08 09 BH 10 9 8 7 6 5 4 3 2 1

Thomson Course Technology PTR,


a division of Thomson Course Technology
25 Thomson Place
Boston, MA 02210
http://www.courseptr.com
Acknowledgments

W
riting any book is not easy, especially a technical programming book. It
takes many great, patient, and talented people to write, edit, design,
market, finance, and produce a book and accompanying CD-ROM. Without
the publishing assistance of Mitzi Koontz, Scott Harris, and Tonya Cupp, it would
be impossible for me to share with you my knowledge of programming in such
a professional and fun manner.
I’d like to thank a good friend, Eric Olson, who ensured the technical accuracy
of this book. Thanks Eric! Now that the book is done, let’s go fishing!
Beyond the technical and business workings of creating a book, the Author must
be fed, loved, and encouraged. Without the support of my beautiful wife Sheila,
this would never have happened. Thanks baby: I love you!
About the Author

M
ichael Vine has taught computer programming, Web design, and database
classes at Indiana University/Purdue University in Indianapolis, IN, and
at MTI College of Business and Technology in Sacramento, CA. Michael
has over 13 years of experience in the information technology profession. He
currently works full time at a Fortune 100 company as an IT Project Manager
overseeing the development of enterprise data warehouses.
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Chapter 1 Access Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1


Getting Started with Access 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Migrating to Access 2003. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Your First Access Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Creating an Access Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Tables and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Common Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Hungarian Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Bound Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Startup Forms and Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Getting Help with Access 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Chapter 2 Introduction to Access VBA . . . . . . . . . . . . . . . . . . .35


The Event-Driven Paradigm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Object-Based Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The VBA IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Introduction to Event Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Introduction to VBA Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Accessing Objects and Their Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The Forms Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The Me Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Command and Label Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Getting User Input with Text Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Variables and Beginning Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Variable Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Variable Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Option Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
viii Access VBA Programming for the Absolute Beginner, Second Edition

VBA Arithmetic and Order of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59


Chapter Program: Fruit Stand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Chapter 3 Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67


If Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Nested If Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Compound If Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Select Case Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Message Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Input Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Common Controls Continued . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Option Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Option Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Check Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Toggle Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Chapter Program: Hangman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Chapter 4 Looping Structures . . . . . . . . . . . . . . . . . . . . . . . . . . .97


Introduction to Looping Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Do While . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Do Until. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Loop While . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Loop Until . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
List and Combo Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Adding Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Removing Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Managing Columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Random Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Chapter Program: Math Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Chapter 5 Functions Continued . . . . . . . . . . . . . . . . . . . . . . . . .121


String-Based Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
UCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
LCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Contents ix

StrComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Mid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
InStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Date and Time Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Day . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
WeekDay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Year. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Second . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Minute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Hour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Now . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Conversion Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Val. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Chr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Asc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Formatting Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Formatting Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Formatting Date and Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Chapter Program: Secret Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Chapter 6 Code Reuse and Data Structures . . . . . . . . . . . . .147


Code Reuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Introduction to User-Defined Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Subprocedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Function Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Arguments and Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Standard Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Single-Dimension Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Dynamic Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Passing Arrays as Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
x Access VBA Programming for the Absolute Beginner, Second Edition

User-Defined Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164


Type and End Type Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Declaring Variables of User-Defined Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Managing Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Chapter Program: Dice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Chapter 7 Debugging, Input Validation,


File Processing, and Error Handling . . . . . . . . . .181
Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Stepping Through Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Immediate Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Locals Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Watch Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Input Validation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
IsNumeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Checking a Range of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
The Err Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
The Debug Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
File Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
About Sequential File Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Opening a Sequential Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Reading Sequential Data from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Writing Sequential Data to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Closing Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Error Trapping for File Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Chapter Program: Trivial Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Chapter 8 Microsoft Jet SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . .213


Introduction to Jet SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Data Manipulation Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Simple SELECT Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Computed Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Built-In Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Sorting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Contents xi

Grouping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
INSERT INTO Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
UPDATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
DELETE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Data Definition Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Creating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Altering Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
DROP Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

Chapter 9 Database Programming with ADO . . . . . . . . . . . .239


ADO Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Connecting to a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Working with Recordsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Introduction to Database Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Introduction to Cursors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Retrieving and Browsing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Updating Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Adding Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Deleting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Chapter Program: Choose My Adventure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

Chapter 10 Object-Oriented Programming


with Access VBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277
Introduction to Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Creating Custom Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Working with Class Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Property Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Method Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Creating and Working with New Instances . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Working with Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Adding Members to a Collection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Removing Members from a Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Accessing a Member in a Collection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
For Each Loops. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Chapter Program: Monster Dating Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
xii Access VBA Programming for the Absolute Beginner, Second Edition

Chapter 11 Microsoft Office Objects . . . . . . . . . . . . . . . . . . . .303


Introduction to Microsoft Office Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Assistant Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Balloon Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Command Bars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
CommandBarControl Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
CommandBarButton Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
FileDialog Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Chapter Program: Animated Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

Chapter 12 Introduction to Data Access


Pages and Access Security . . . . . . . . . . . . . . . . . . .325
Introduction to Data Access Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Creating Data Access Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Adding Group Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Publishing Data Access Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Introduction to Access Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Activating Logon Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Enabling User-Level Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Connecting to a Workgroup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Securing Access from Data Access Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

Appendix A Common Character Codes . . . . . . . . . . . . . . . . . . .349

Appendix B Keyboard Shortcuts for the Code Window . . .351

Appendix C Trappable Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . .353

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
Introduction

I
ntroduced in the early 1990s, Microsoft Access has become one of the
most powerful and popular applications in the Microsoft Office suite of
applications. Part of Microsoft Office Professional Edition 2003,
Microsoft Access 2003 allows database developers and programmers to build
dynamic and easily portable databases. Access comes with many easy-to-use features
such as graphical forms, report designers, and SQL query builders, as well as a sub-
set of the Visual Basic language known as VBA for building data-driven applications.
Microsoft Access VBA Programming for the Absolute Beginner, Second Edition, is not a
guide on how to use Access and its many wizards. There are already many books
that do that! Instead, Microsoft Access VBA Programming for the Absolute Beginner
concentrates on VBA programming concepts including variables, conditions,
loops, data structures, procedures, file I/O, and object-oriented programming
with special topics including Microsoft Jet SQL, database programming with
ADO, Microsoft Office objects, and data access pages.
Using Premier Press’s Absolute Beginner series guidelines’ professional insight, clear
explanations, examples, and pictures, you learn to program in Access VBA. Each
chapter contains programming challenges, a chapter review, and a complete program
that uses chapter-based concepts to construct a fun and easily built application.
To work through this book in its entirety, you should have access to a computer
with Microsoft Access installed. The programs in this book were written in
Microsoft Office 2003, specifically Access 2003. Those readers using older ver-
sions of Microsoft Access, such as Access 2002 or Access 2000, will find that many
of the VBA programming concepts still apply.

What You’ll Find in This Book


To learn how to program a computer, you must acquire a complex progression of skills.
If you have never programmed at all, you will probably find it easiest to go through the
chapters in order. Of course, if you are already an experienced programmer, it might
not be necessary to do any more than skim the earliest chapters. In either case, pro-
gramming is not a skill you can learn by reading. You’ll have to write programs to
learn. This book has been designed to make the process reasonably painless.
xiv Access VBA Programming for the Absolute Beginner, Second Edition

Each chapter begins with a brief introduction to chapter-based concepts. Once inside the
chapter, you’ll look at a series of programming concepts and small programs that illustrate
each of the major points of the chapter. Finally, you’ll put these concepts together to build a
complete program at the end of the chapter. All of the programs are short enough that you
can type them in yourself (which is a great way to look closely at code), but they are also avail-
able on the accompanying CD-ROM. Located at the end of every chapter is a summary that
outlines key concepts learned. Use the summaries to refresh your memory on the important
concepts. In addition to summaries, each chapter contains programming challenges that will
help you learn and cement chapter-based concepts. Throughout the book, I’ll throw in a few
other tidbits, notably the following:

TRI
CK These are good ideas that experienced programmers like to pass on.

TRA
P There are a few areas where it’s easy to make a mistake. I’ll point them out to
you as we go.

HIN
T Pay special attention to these areas for clarification or emphasis on chapter
concepts.

In the Real World


As you examine concepts in this book, I’ll show you how the concepts are used beyond beginning
programming.

Who This Book Is For


Microsoft Access VBA Programming for the Absolute Beginner, Second Edition, is designed for the
beginning Access VBA programmer. Persons with backgrounds in other programming lan-
guages and databases will find this book to be a good tutorial and desk reference for Access
VBA. Specifically, this book is for the following groups:
• High school or college students enrolling or enrolled in an Access programming class
• Programming hobbyists and enthusiasts
• Office personnel with beginning database programming responsibilities
• Professional database developers wanting to learn the Microsoft Access VBA language
• Home users wanting to learn more about Access and VBA
1
C H A P T E R

Access
Essentials

ntroduced over a decade ago, Microsoft Access is a fully functional RDBMS

I (Relational Database Management System) that has become one of the most
powerful programs in the Microsoft Office suite of applications.
Part of the Microsoft Office Professional Edition 2003, Access 2003 provides both
beginning and professional database developers alike a cost effective way to lever-
age key database functionality with an easy-to-use graphical interface.
In this chapter I get you started using the Access 2003 application by showing you
Access essentials such as files, databases, tables, fields, relationships, forms, con-
trols, and queries. You learn these Access essentials by building a simple database
to manage students and homework assignments.

Getting Started with Access 2003


Microsoft has done a great job making Access 2003 intuitive and easy to learn by
providing a simple interface and an excellent help system. If you’re already famil-
iar with previous versions of Access databases, you’ll appreciate the new and
updated functionality for
• Viewing object dependencies
• Enabling automatic error checking in forms and reports
• Propagating control property changes to bound fields
• Smart Tags with Access objects
2 Access VBA Programming for the Absolute Beginner, Second Edition

• Database backups
• XML support
• Improved Microsoft Office online help
• Collaborate development efforts with friends and colleagues using Microsoft
SharePoint Services
• Improved macro and function security
• Context-based help for SQL view
• Manage SQL Server databases with Access projects
• Updated Microsoft Office 2003 Object Model
• New Visual Basic objects, properties, and methods

System Requirements
System requirements for installing and using Microsoft Access 2003 are straightforward, as
depicted in Table 1.1.

T A B L E 1.1 A C C E S S 20 03 S Y S T E M R E Q U I R E M E N T S

Component Requirements
Processor Pentium 233 MHz or faster processor
Memory 128 MB or RAM or greater
Hard Disk 180 MB minimum, an additional 200 MB for optional files
Drive CD-ROM or DVD
Display 600×800 or higher resolution monitor
Operating System Windows 2000 with sp3, Windows XP or later

Once installed, you can harness many of the great features of Access 2003 on your local PC
by building databases with tables and queries, and creating user interfaces with forms,
reports, and Data Access Pages.
If you wish to deploy Data Access Pages over the Internet, you also need access to a web
server such as IIS (Internet Information Services). For more information please visit
Microsoft’s IIS web site at http://www.microsoft.com/WindowsServer2003/iis/default.mspx.
Chapter 1 • Access Essentials 3

Microsoft SharePoint Services is also recommended for professional Access developers col-
laborating with other colleagues on development activities such as versioning, check-in/
check-out processes, and approval workflows. For more information, see Microsoft’s Share-
Point Services web site at http://www.microsoft.com/windowsserver2003/technologies/
sharepoint/default.mspx.

Migrating to Access 2003


Depending on which previous Access version you were leveraging, migration woes range
from none to minor. In fact, migrating from Access 2002 is real easy. In most cases you simply
need to open your previously created Access 2002 database in Access 2003 once installed.
Your Data Access Pages and VBA code from Access 2002 should also open in Access 2003 with
no problems.
If you’re migrating from Access 2000, it is also easy to upgrade as Access 2003 supports the
same file format. Like previous versions of Access 2002 databases, Access 2003 should import
your Access 2000 databases with no problems, including your Access 2000 VBA code. How-
ever, you need to convert any Data Access Pages built in Access 2000 by simply opening the
Data Access Page in Design view with an Access 2002 or higher database. Microsoft Access
should then prompt you to convert the Data Access Page.
For versions older than 2000, such as Access 97, you must convert the Access files first.
Microsoft provides step-by-step procedures and toolkits for converting older Access files in
this situation.
For more information on converting older Access files, simply use the key phrase “convert-
ing an Access file” in the Microsoft Office online help in Access 2003 or on the web at
http://office.microsoft.com.

Your First Access Database


IT professionals, teachers, students, accountants, managers, scientists, computer enthusi-
asts, and many more people just like you have a need to collect and manage data. Data that
is complex or changes frequently is best stored and managed in a database such as Access.
Let’s say you are a school teacher who has a list of students, attendance, grades, tests,
quizzes, and homework. You could keep track of your students, their attendance, grades,
and such in a notebook or in an electronic document. But suppose one of your students has
a name change in the middle of the school year. To solve this record-keeping issue, you need
to update all occurrences of this student’s name in your lists, whether paper or electronic.
In a well-designed Access database, you only need to make this change once.
4 Access VBA Programming for the Absolute Beginner, Second Edition

Databases allow you to ask questions of your data. For example, you could group your stu-
dents by their grade point average, find out which students missed fewer than 3 school days,
and which students have failed to turn in 10 or more homework assignments and have a
grade point average less than 2.0.
Access implements a relational database to link information such as homework results to
one or more students. Looking at Figure 1.1, you can easily see how Access links a student to
one or more homework assignments using tables and keys.

TRI
CK A relational database stores data in separate tables by subject matter and pro-
vides a system or user-defined link (key) between the tables to produce useful
information through the relationship.

Figure 1.1
Relational data in
Microsoft Access.

The two sets of tables in Figure 1.1 are relational in that the HomeWork_Results table main-
tains a student key (in other words, a relationship) back to the Students table.

Creating an Access Database


One of the most important database professional jobs is the up-front requirement gathering
and data analysis of your database project. For example, you should consider answers to the
following questions before creating your database:
• What is the purpose of my database?
• Who will use my database and how will they access it?
Chapter 1 • Access Essentials 5

• What types of data will my database contain?


• What are the relationships between my data?
• What types of user interfaces to my database will I need?
• What types of reports does my database need to produce?
• What types of queries (questions) does my database need to answer?

Many of the beforementioned questions require a fair amount of analysis and design. Good
analysis prior to creating a database is essential to creating an effective database that
requires minor maintenance, yet is extendable and robust.
The remainder of this chapter assists you in understanding how many of these questions
can be answered from an analysis, design, and construction point of view. Specifically, I
show you how to create a simple database that can manage and report students and their
homework scores.
For now, simply launch the Access program icon by choosing Start, Programs, or from any
other shortcut you may have created during or after the Microsoft Office installation.
Once opened, you should see an Access window similar to the one depicted in Figure 1.2.

Step 1: Create a new


Access file

New file
window pane

Step 2: Create a
blank database

Figure 1.2
Creating a new
Access file.
6 Access VBA Programming for the Absolute Beginner, Second Edition

If you do not see the New File pane shown in Figure 1.2, simply click the New File icon on
the Access toolbar or select it from the File, New menu item. Once you see the New File win-
dow pane, click the Blank Database link depicted in Figure 1.2. The Blank Database link
opens another window, allowing you to select where your database is initially created and
saved. Finish creating your database by simply typing a filename for your database and click
Create as seen in Figure 1.3.

Figure 1.3
Creating a new
Access database.

You should now see an Access window similar to that in Figure 1.4.

TRI
CK Microsoft Access databases are always stored in binary files with the file extension
.mdb. These files store relevant information about your Access database, including
tables, fields, reports queries, and much more.

You can also open an existing Access file by clicking the Open icon on the Access toolbar or
by choosing File, Open (both depicted in Figure 1.5).
If you’re looking for sample databases to learn, work, or play with, Microsoft has been provid-
ing the Northwind database for many Access versions now. You can find the Microsoft sample
Northwind database by clicking the Help, Sample Databases menu item seen in Figure 1.5.
Chapter 1 • Access Essentials 7

Figure 1.4
New Access
Database window.

HIN
T You may have to install the sample database feature, which Access prompts you
to do if the Northwind database is not already installed. I recommend installing
the sample Northwind database if you have not already done so, as I use its
tables and records periodically during this book.

Open an
existing database

Open the Microsoft


sample Northwind
database

Figure 1.5
Opening an
existing Access
database.
8 Access VBA Programming for the Absolute Beginner, Second Edition

TRI
CK When opening an existing Access database, you may get an unsafe expression or
macro security warning such as the one seen in Figure 1.6.

Figure 1.6
Access macro
security warning.

In short, you get this security message because your macro security is set to
Medium and Access cannot verify this is a trusted source (digitally signed, for
instance) or that someone has not tampered with your database since you last
opened it. You can, however, disable this warning by changing the macro security
level to Low, which is accessed from the Security menu item in the Tools, Macro
menu.

Tables and Fields


After creating your Access database file, you are now ready to begin defining how your data is
stored. Access groups data by subject matter in entities called tables. Tables have fields, which
describe the subject matter. For example, a Student table may have fields called Student_Id,
First_Name, Last_Name, Middle_Initial, Gender, and Age. Each field has a definition that tells
Access how the field values should be stored. For example, the Student_Id field is stored as
a number as opposed to the First_Name field, which is stored as text.
Each Access table must contain at least one or more fields. Together the fields comprise a row
of data also known as a record. Generally speaking, tables should be assigned a primary key,
which identifies each row of information in the table as unique. For example, the Student_Id
field in the Students table is an excellent candidate for the primary key. The notion of
primary keys is essential for creating relationships between tables in Access.
To create a table in Access, simply double click the Create table in Design view link as seen
in Figure 1.7.
Exploring the Variety of Random
Documents with Different Content
Regarding, therefore, the ‘alod’ as in some sense a bundle of
rights and property, let us try to consider these clauses with a fresh
mind in the light of what we have learned of Cymric tribal custom.
Under this custom, speaking broadly, as we have
seen, daughters did not share in the landed rights The position of
females and
of the gwely. They received instead of landed modifications
rights in the gwely their gwaddol or portion, made in their
mostly, no doubt, in cattle, and they were favour.
supposed with it to marry into another gwely, in
whose landed rights their sons were expected to share by paternity.
If women inherited landed rights at all, it was exceptionally in the
case of failure of male heirs, and then only so that their sons might
inherit. The heiress in such a case, under Cymric as well as Greek
tribal law, was in quite an exceptional position, and, as we have
seen in Beowulf, the sister’s son might be called back into the
mother’s family to prevent its failure for want of heirs.[112] The
exclusion of female successors from terra Salica is therefore quite in
accordance with tribal custom.
That the clauses as to personalty in the ‘de alodis ’ were
modifications of ancient Salic custom, made in favour of females, is
rendered almost certain by the position of the last clause as a saving
clause, apparently inserted with the object of protecting the rights of
the sons in the land of the alod, by preventing the application to it of
the previous clauses.
Codex 1 does not describe the land as terra
Salica. It is content to protect land without The land of the
alod was terra.
qualification from the application of the previous
clauses, which, if applied to land, would transgress against tribal
custom. And the same may be said of Codices 3 and 4. But in the
Codices 5 to 10 and in the ‘Lex emendata’ the words ‘terra Salica’
are used.
This is a point of importance, because it goes far to show that the
whole of the land of the alod was terra Salica, and protected by the
saving clause from participation by females. The use of the word
land alone in Codex 1 forbids our thinking that part of the land of
the alod was terra Salica and the rest not terra Salica.[113] And this
consideration seems to show that to import into the clause any
explanation of the term derived from the word Sala, so as to confine
its meaning to the ‘Haus und Hofland’ or the ‘Väterliches Wohnhaus,’
as Amira[114] and Lamprecht[115] would do, would be misleading.
The homestead of the chief of a tribal family holding, on terra Salica,
may, like the Roman villa, have passed by various and even natural
stages into the ‘Herrengut,’ or ‘terra indominicata’ of later manorial
phraseology, and the term terra Salica may have clung, as it were, to
it. But to reason backwards to the Lex Salica from the instances of
its later use, given by Guérard in his sections on the subject, seems
in this case, if I may venture to say so, to be a reversal of the right
order of inference. Lamprecht carefully guards himself against the
view that the terra Salica of the Lex was as yet a ‘Herrengut,’ and
Guérard, in his careful sections on the subject, admits three stages
in the evolution of the terra Salica: (1) ‘l’enceinte dépendant de la
maison du Germain;’ (2) ‘la terre du manse seigneurial;’ (3)
‘simplement la terre possédée en propre, quelquefois donnée en
tenure.’[116]
This may in some sense fairly represent the line of evolution
subsequently followed, and I have long ago recognised the embryo
manor in the ‘Germania’ of Tacitus; but, for our present purpose, this
does not seem to help to an understanding of the term as used in
the Lex Salica.
When all the Codices are taken together into account, terra Salica
seems to include the whole of the land, or landed rights, of the alod.
From the whole, and not only the chief homestead, the succession of
females is excluded, and it is the whole, and not the chief
homestead only, which is to be divided between the nepotes and
pronepotes of the deceased tribesman.
Approaching the Lex Salica, as we are doing, from a tribal point of
view, we seem to get upon quite other and simpler ground.
The emphasis laid in the Lex Salica upon the
distinction in social status between persons ‘living Terra Salica was
land held under
under the Lex Salica’ and those living under Roman the rules of the
law suggests that land held under the Lex Salica Lex Salica and
was not held under the same rules as those under subject ultimately
to division per
which the ‘Romanus possessor’ held his ‘res capita between
propria.’ It would seem natural, then, that terra great-
Salica should be land held under Salic custom as grandchildren.
opposed to land held under Roman law. And if this
be the simple rendering of the term terra Salica in the Lex, then
returning to the likeness of the Salic ‘alod’ to the Cymric family
holding some likeness might be expected in the rules of succession
to the land of the alod when compared with the Cymric rules of
succession to the ‘tir gweliauc’ or family land of the gwely.
We have seen that in the gwely the descendants of a common
great-grandfather were kept together as a family group till, after
internal divisions between brothers and then between cousins, there
was at last equal division of landed rights between second cousins,
i.e. great-grandsons of the original head of the gwely. The fact of
this right of redivision at last between great-grandchildren was
apparently what held the family group together till the third
generation.
The last clause of the ‘de alodis,’ even as it stands in Codex 1,
coincides with Cymric custom in so far as it excludes females from
landed rights and confines inheritance in the land of the alod in the
first instance to sons ‘… qui fratres fuerint.’
And when at last later Codices call the land of the alod terra
Salica, and the addition in Codex 10 is taken into account, the
evidence becomes very strong indeed that under Salic custom the
land of the alod or terra Salica was held as a family holding, and, like
the land of the gwely, divisible, first between sons, then between
grandsons, and at last between great-grandsons.
But when among grandsons or great-grandsons contention arises,
after long time, concerning the alod of land, they [the lands of the
alod] should be divided, not per stirpes, but per capita.

The later the date at which this sentence was added to the final
clause of the ‘de alodis,’ the stronger becomes the evidence of what
ancient Salic custom on this matter was.
Assuredly the object of these words is not to
introduce a new principle. They obviously describe The final clause
protects the
ancient Salic custom in order to protect it. And how family holding.
could a division per capita amongst great-
grandsons take place unless, as in the Cymric gwely, the holding of
terra Salica had during the whole period of the three generations
been kept in some sense together as a family holding?
It would be unwise to press analogies between Cymric and Salic
tribal custom too far, but I have before pointed out that a system of
wergelds, to which paternal and maternal relatives each individually
contributed their share, seems to imply an original solidarity of
kindred, which must, wherever it was fully in force, have been
connected with a corresponding solidarity in the occupation of land,
together with its complement, an individual ownership of cattle. And
in the light of the ‘de alodis’ it does not seem unlikely that it may
have been so under ancient Salic custom.
If the foregoing considerations be accepted, may
we not recognise in the term terra Salica, as at first Distinction
between land
used, a meaning analogous to that which Professor under Salic and
Vinogradoff has recently so brilliantly given to the land under Roman
Anglo-Saxon term ‘folc-land’?[117] In both cases law.
surely it was natural that there should be a term distinguishing land
still held under the rules of ancient tribal custom from land held
under the Romanised rules of individual landownership.
It is not necessary to do more than allude here to the various
clauses of the Lex Salica from which the existence of individual
holdings is clearly to be inferred. If, from this single mention of terra
Salica and its ultimate division among great-grandsons per capita,
the continued existence of tribal or family holdings held still under
Salic law may be legitimately inferred, it is at least equally clear that
the Romanus possessor who lived and held his possession as res
propria under Roman law also existed. And if so the two classes of
holders of land must often have been neighbours. The vicini, ‘qui in
villa consistunt,’ of the title ‘de migrantibus’ (XLV.) may some of them
have been of the one class and some of them of the other. The
objection of a single person living under Salic law to the interloper
would have a new meaning and become very natural if the conflict
between the two systems were involved. And when we have
reminded ourselves of these facts the title De eum qui se de
parentilla tollere vult, to which allusion has already been made,
which enabled the tribesman, by the somewhat theatrical action of
breaking the four sticks of alder over his head, to cut himself loose
from his parentilla, takes its proper place as evidence of the
temptation which must have beset the young tribesman in close
contact with Gallo-Roman neighbours to free himself from what had
come to be regarded as a bondage, and to take an independent
position as an individual under the new order of things which was
fast undermining the old.

Besides the title ‘de alodis’ there is another


source of information which must not be Edict of Chilperic
a.d. 561-584.
overlooked—viz. the Edict of Chilperic (a.d. 561-
584).[118]
This edict appears to have been issued soon after the extension of
the Frankish boundary from the Loire to the Garonne, and specially
to apply to the newly conquered district.
This conquest would necessarily extend the area within which
Salic settlements would be made among non-Salic neighbours, and
multiply the cases in which even a Salic Frank
might find himself less securely surrounded by Admission of
female succession
kinsmen than of old. Under these altered to prevent Salic
circumstances instances would become more and land from passing
more frequent of the close neighbourhood of from the family
group to
tribesmen still holding under Salic custom and strangers.
strangers living under Roman laws of succession.
The clauses of the edict seem accordingly to be directly intended to
prevent lapsed interests of Salic tribesmen in land from falling to the
vicini when there were brothers or female relations surviving. In old
times in purely Salic settlements lapsed interests must usually have
become merged in the general rights of the kindred, the vicini being
kinsmen. And no harm might come of it. Landed rights would
seldom have passed away from the kindred. But as the stranger
element increased in prominence the kindreds would more and more
suffer loss. Hence probably the extended rights given by the edict to
female relatives. It allows them to succeed in certain cases so as to
prevent the land, or, as we should rather say, the landed rights, from
lapsing to the vicini.
Clause 3 is as follows:—

Simili modo placuit atque Likewise we will and declare


convenit, ut si quicumque that if any one having vicini, or
vicinos habens aut filios aut sons or daughters, shall be
filias post obitum suum succeeded to after his death, so
superstitutus fuerit, quamdiu long as the sons live let them have
filii advixerint terra habeant, the land as the Lex Salica
sicut et Lex Salica habet. provides.

So far evidently no change is made; old custom still holds good.


But in the rest of the clauses a modification is made evidently to
meet altered circumstances, and specially to shut out the vicini.
Et si subito filii defuncti And if suddenly the sons shall
fuerint, filia simili modo accipiat have died let the daughter receive
terras ipsas, sicut et filii si vivi those lands as the sons would
fuissent aut habuissent. Et si have done had they been alive.
moritur, frater alter And if he [a brother] should die
superstitutus fuerit, frater and another brother should
terras accipiat, non vicini. Et survive, let the brother receive
subito frater moriens frater non those lands, not the vicini. And if
derelinquerit superstitem, tunc suddenly the brother shall die not
soror ad terra ipsa accedat leaving a brother surviving, then
possidenda.… let a sister succeed to the
possession of that land.…

The remainder of the clause is very difficult to construe in the


imperfect state of the text, and it is not necessary to dwell upon it.
It seems to apply to newcomers (‘qui adveniunt’) and their rights
inter se.[119]
We have then in these clauses an allusion to ancient tribal custom
as well as to the change made necessary by the new circumstances.
The implication is that under the rule of ancient
custom, on a brother’s death without children, his Analogy of Cymric
custom.
brothers did not succeed to his land, but the vicini.
Now the brother is to succeed, not the vicini.
At first sight this seems unnatural and unlikely. But it ceases to be
so if we may regard the alod of terra Salica as a family holding
under conditions somewhat like those of the gwely. For under Cymric
custom the brother did not succeed to the childless brother as his
heir. The co-inheritors, as far as second cousins, were his heirs. In
other words the lapsed share went to his vicini, but they were the
kinsmen of his own gwely.[120]
Nor did a brother succeed to his brother’s da, and the grazing
rights and homestead connected with it. He had received this da, as
we have seen, from his chief of kindred by ‘kin and descent,’ i.e. by
tribal right in his kindred, and therefore if he should die without
children his da and everything he had by kin and descent went, not
to his brothers, but back to the kindred or the chief of kindred from
whom he received it.

If the son die after 14 years of age and leave no heir, his ‘argluyd’
is to possess all his da and to be in place of a son to him and his
house becomes a dead-house. (Ven. Code, i. p. 203.)[121]

The lapse of landed rights in family holdings to the kindred was


one thing. Their passing out of the kindred to vicini who were
strangers would be quite another thing.
When after a time, let us say under cover of the title ‘de
migrantibus’ or upon extended conquests, others, perhaps ‘Romani
possessores,’ had taken places in the villa side by side with the
tribesmen living under the customary rules of terra Salica, or when
Salic Franks had settled among strangers, the new element would
have to be reckoned with.
In the clause ‘de migrantibus’ the protection of ancient Salic
custom was sought by the exclusion of strangers at the instance of a
single objector from terra Salica. In the Edict of Chilperic, on the
other hand, the presence of stranger vicini was taken for granted,
and the protection of terra Salica sought by extending the right of
succession to brothers and females, so that at least fewer cases
might arise of lapsed inheritances falling away from the kindred into
the hands of the vicini who might be strangers.
The breaking up of tribal custom thus was not all at once, but by
steps. At first terra Salica was limited to men, then female
succession was allowed, and lastly, in default of kindred, stranger
vicini under certain conditions were admitted to the lapsed
inheritance.
IV. THE WERGELDS AND DIVISION OF
CLASSES IN THE ‘LEX RIPUARIORUM.’
The customs of the Ripuarian Franks as to wergelds, as might be
expected, do not seem to have varied much from those of the Salic
Franks. They were probably neighbours in close contact with each
other, and, judging from the laws, the population of the district was
a mixed one.
The wergeld of the Ripuarian ingenuus, like that
of the Salic Frank or barbarian living under the Lex Wergeld of
freeman as under
Salica, was 200 gold solidi, and 12 co-swearers the Lex Salica,
were required to deny the homicide (Tit. VII.). 200 gold solidi.
That of the official
Here again official position seems, as under the threefold.
Salic law, to be protected by a triple wergeld. The
grafio or comes, who was a fiscal judge, had a wergeld of 600 solidi
(Tit. LIII.). The payment for one in truste regis was also 600 solidi
(Tit. XI.).
On the other hand, the wergeld of a ‘homo regis’ (Tit. IX.), like
that of the ‘puer regis’ of the Salic law, was only 100 solidi, and that
of the ‘man’ of the Church the same (Tit. X.), i.e. half that of the
Ripuarian ingenuus.
Consistently with this, the triple payment for killing a woman
between childbearing and 40, as also in the Salic Law, was 600
solidi, whilst the wergeld of the ‘femina regia’ or ‘ecclesiastica’ was
only 300 solidi.
There are apparently hardly any indications as to how or to whom
the wergelds were to be paid. There is only one reference to the
parentes, and that is not connected with the wergelds. In Tit. LXXXV.
it is stated that he who shall disinter a corpse and rob it shall pay
200 solidi and be ‘expelled till he shall satisfy the parentes.’
The murderer alone seems to be responsible, unless indeed the
few words added to the clauses imposing the triple wergeld of 600
solidi upon the murderer of a woman may be taken to be of general
application. The words are these:—

‘If the murderer shall be poor, so that he cannot pay at once, then
let him pay per tres decessiones filiorum.’

Has it really come to this, that since the Edict of Childeric II. came
into force the parentes are released, and the descendants of the
murderer, for three generations, are to be in slavery till the wergeld
is paid? It may be so, for the penalty in default of payment of the
wergeld probably included his own slavery, which involved with it
that of his descendants.
The ancient tribal tradition that within the family
there could be no feud or wergeld, but exile only, The fisc gradually
takes the place of
was still apparently in force. In Title LXIX. there is the kindred.
a clause which enacts that if any one shall slay one
next in kin (‘proximus sanguinis’) he shall suffer exile and all his
goods shall go to the fisc. This exile of the slayer of a near kinsman
and forfeiture of his goods to the fisc seems to be almost the only
distinct important survival of tribal feeling, apparently neither
wergeld nor the death of the slayer being admitted. But in this case
the fisc was, as usual, the gainer. Parricide under any system of
criminal law would be a capital crime. The pertinacity with which the
custom that, being a crime within the kindred, there could be no
feud and therefore no wergeld, was adhered to in the midst of
manifold changes in circumstances, feeling, and law, is very
remarkable.
There is not much else in the Ripuarian laws throwing light upon
tribal customs as regards the solidarity of the kindred. But there is a
good deal of interesting information upon the important subject of
the treatment of strangers in blood.
We have seen that in the Lex Salica the
definition of the ingenuus with a wergeld of 200 Distinction
between persons
solidi was the Francus or barbarus living under living under Salic
Salic law. The ‘barbarus’ who lived under Salic law law and those
living under
was no longer a stranger; he had in fact become a Roman law who
Frank. As we should say, he had been naturalised. were treated as
Hence there was no inconsistency in the apparent strangers in
blood.
occasional indiscriminate use of the words ‘Francus’
and ‘ingenuus.’ They meant the same thing. But there is nothing to
show that the ordinary Gallo-Roman was included under the term
‘barbarus who lived under Salic law.’ On the other hand, we find him
living under the Roman law.
In considering the method of dealing with people of so mixed a
population as that of the Ripuarian district it is very important to
recognise how, under tribal custom, every man continued to live
under the law under which he was born, until by some legal process
his nationality, so to speak, was admitted to be changed. The Cymric
example has shown us how strictly the tribal blood and admission
from outside into the tribe were guarded. In such a mixed
population as that of the Ripuarian district, the strictness may have
been somewhat relaxed, and the formalities of admission less
difficult. But there is evidence enough, I think (with great deference
to M. Fustel de Coulanges’ doubts on the subject), to show that to
some extent at any rate social distinctions were still founded upon
‘difference of blood.’ At all events it is worth while to examine the
additional evidence afforded by some clauses in the Ripuarian laws.
In Tit. XXXI. it is stated that Franks,
Burgundians, Alamanni, and others, of whatever Strangers of allied
tribes have
nation, living in the Ripuarian country, are to be wergelds
judged and dealt with, if guilty, according to the according to the
law of the place of their birth, and not by the law of their birth,
but if they cannot
Ripuarian law, and it is significantly added that find compurgators
(living away from their kinsmen as they often must must go to the
be) if they cannot find compurgators they must ordeal.

clear themselves by the ordeal of ‘fire or lot.’[122]


Here we come upon one of the strongest tests of tribal custom in
its insistence upon the necessity of a man being surrounded by a
kindred before he can be a fully recognised tribesman. Unless he be
surrounded by kinsmen who can swear for him, under tribal custom,
he must have recourse to the ordeal in case of any criminal charge.
There is a clause, not inconsistent, I think, with Tit. XXXI., which
seems to draw a clear distinction in favour of tribes more or less
nearly allied in blood with Franks, viz. the Burgundians, Alamanni,
Bavarians, Saxons, and Frisians, resident in the Ripuarian district, as
contrasted with the Romanus, who surely must be the Gallo-Roman.
In Title XXXVI. the following wergelds are stated, the slayer being
a Ripuarian in all cases:—

A stranger Frank 200 solidi


” ” Burgundian 160 ”
” ” Romanus 100 ”
” ” Alamann
” ” Frisian
” ” Bavarian } 160 ”
” ” Saxon

Thus the Roman stranger is placed in the lowest


grade. His wergeld is only 100 solidi—half that of Wergeld of the
Romanus 100
the Ripuarian or Salic Frank—whilst those tribes solidi instead of
nearer in blood to the Frank are classed together 200 or 160 solidi.
with a wergeld of 160 solidi, not much less than
that of the Frank. Indeed, there is reason to believe that these were
the wergelds of the several tribes in force in their own country
according to their own laws.[123]
In this connection the view of M. Fustel de Coulanges, that the
term ‘Romanus’ is confined to the libertus freed under Roman law,
hardly seems natural. The evidence seems to show that the man
freed under the formalities of Frankish law thenceforth lived under
Salic law and became a Frankish freeman with a freeman’s wergeld
of 200 solidi, whilst the man who became a freedman under process
of Roman law thenceforth lived under Roman law, and became a
Roman freeman—a Romanus—with a wergeld of only 100 solidi. The
inference that the difference in status was the result of difference in
blood is not altered by the fact that the social status awarded to the
Gallo-Roman was the same as that of the libertus in some other
laws.
The fact relied upon by M. Fustel de Coulanges, that under the
laws of the Burgundians and the Wisigoths the Gallo-Roman was
placed in a position of equality with the Teutonic conquerors, need
not, I think, affect the view to be taken of his position under the
Salic and Ripuarian laws. Tribal custom had to meet in Burgundy and
the Wisigothic district with Roman law and Roman institutions still
comparatively in their full strength. Marriages with the Gallo-Roman
population were encouraged, and the system of wergelds almost
entirely superseded. The Frankish conquest was of another kind, and
the Frank was hardly likely to care to meet the Gallo-Roman on
equal terms.
Passing now from the position of the stranger
who was recognised as a freeman, let us try to get Position of the
freedman or
a clear idea of the position of the freedman under denarialis under
the Ripuarian law, taking the cases of the Frankish Frankish law. His
freedman and the Roman libertus separately. wergeld 200
solidi.
In Tit. VIII. the payment for slaying a servus is
36 solidi. In Tit. LXII., if any one makes his servus into a tributarius
or a litus and he is killed, the penalty is the same—36 solidi, but if
he chooses to make him into a denarialis (i.e. a freedman under
Frankish law) then his value shall be 200 solidi.
The tributarius or litus has gained but one step up the ladder of
Frankish freedom. But the denarialis, with nearly six times his
wergeld, has as regards his wergeld reached the highest rung at a
single leap.
Though, however, as regards wergeld he has
done so, in another sense he has by no means But till he has a
free kindred, if he
done so. Under tribal custom he would not attain has no children
the fisc is his heir.
to full tribal rights till a kindred had grown up
around him. So under Tit. LVII. the ‘homo denarialis,’
notwithstanding his wergeld of 200 solidi, is recognised as having no
kindred.

(s. 4) If a ‘homo denariatus’ shall die without children he leaves no


other heir than our fisc.

And in full accord with this statement is the following clause in the
‘Capitulare legi Ripuariæ additum’ of a.d. 803.

Homo denarialis non ante hæreditare in suam agnationem poterit


quam usque ad terciam generationem perveniat.

So that more of tribal custom still prevails in his case than at first
appears. Only in the third generation are full rights of inheritance
secured to his successors.
If now we turn to the libertus under Roman law,
Tit. LXI. states that if any one shall make his Wergeld of the
libertus under
servus into a libertus and Roman citizen, if he shall Roman law 100
commit a crime he shall be judged by Roman law, solidi.
and if he be killed the payment shall be 100 solidi:
but ‘if he shall die without children he shall have no heir but our fisc.’
Thus, as regards inheritance, the Frankish denarialis and the
Roman libertus seem to be treated alike, notwithstanding the
difference of wergeld.
Turning to another matter, the Ripuarian laws, being of later date
than the Lex Salica, made provision for the wergelds of the clergy.
Tit. XXXVI. provided that the clergy should be
compounded for according to their birth, whether Wergelds of the
clergy, and of
of the class of servi, or men of the king or of the their ‘men.’
Church, or liti, or ingenui. If ingenui, they were to
be compounded for with 200 solidi. Then the wergelds of the higher
clergy are stated as follows:—

Subdeacon 400 solidi


Deacon 500 ”
Priest 600 ”
Bishop 900 ”

And there is a long clause De Tabulariis (Tit. LVIII.) providing that


servi may be made under process of Roman law tabularii of the
Church, so that they and their descendants shall be and remain
servants of the Church, and render the proper services of tabularii to
the Church, without any one having power further to enfranchise
them. In case of their death without children the Church is to be
their heir. These appear to be the ‘men of the Church’ whose
wergeld was 100 solidi.
The Tit. LVI. De alodibus is as follows:—
The clause ‘De
alodibus.’

Si quis absque liberis If any one shall have died


defunctus fuerit, si pater without children, if father and
materque superstites fuerint in mother survive they shall succeed
hereditatem succedant. to the hereditas.
Si pater materque non If there are not father and
fuerint, frater et soror mother, brother and sister shall
succedant. succeed.
Si autem nec eos habuerit, But if he has not these either,
tunc soror matris patrisque then the sister of the mother and
succedant. Et deinceps usque the sister of the father shall
ad quintam genuculum, qui succeed. And further, up to the
proximus fuerit, hereditatem fifth knee, whoever is nearest
succedat. shall succeed to the inheritance.
Sed cum virilis sexus extiterit, But as long as the male sex
femina in hereditatem survive, a woman shall not
aviaticam non succedat. succeed to the hereditas aviatica.

All that need be remarked regarding this title is, first its close
resemblance to the clause ‘de alodis’ in the Lex Salica and the
confirmation given by the phrase ‘hereditas aviatica’ to the family
character of the ‘alod,’ and secondly that it seems to belong to the
time when female succession was favoured.
Whether the ‘hereditas aviatica’ included the whole alod or only
the land of the alod, on failure of male heirs, females were now to
succeed.
There remains only to be noticed the interesting
addition to Tit. XXXVI. which enacts that if any one The traditional
value of animals
ought to pay wergeld he should reckon, inter alia: in payment of
— wergelds. The
wergeld of 200
solidi = 100 oxen.
The ox, horned, seeing, and sound, for 2 solidi
The cow, horned, seeing, and sound, for 1
[3 or] solidus
The horse, seeing and sound, for 6 solidi
The mare, seeing and sound, for 3 ”

And this is followed by a final clause which is found only in some


of the manuscripts and which is probably an addition made under
Charlemagne:—

If payment shall be made in silver, let 12 denarii be paid for the


solidus, sicut antiquitus est constitutum.

Thus our consideration of these laws ends with the fact that,
before the disturbance in the currency made by Charlemagne, the
wergeld of the Frankish freeman of 200 gold solidi or heavy gold
mina was still, in the Ripuarian district at all events, a normal
wergeld of 100 oxen.
V. THE ALAMANNIC AND BAVARIAN LAWS.
These laws have an interest of their own, but only those points
come directly within the range of this inquiry which are likely to
throw light upon the interpretation of the Anglo-Saxon laws.
Beginning at once with the wergelds, there are two distinct
statements.
According to the ‘Pactus,’ which is assigned to
the sixth or seventh century, and which is The wergelds of
the early
considered to represent customs of the Alamanni Alamannic
before they were conquered by the Franks,[124] the ‘Pactus,’ and of
the later ‘Lex
wergelds were as follows:— Hlotharii.’

Baro de mino flidis 170 solidi (? 160)


Medianus Alamannus 200 ”
Primus Alamannus 240 ”

And for women:—

Femina mino flidis 320 ”


Mediana 400 ”
Prima Alamanna 480 ”

These wergelds correspond very closely in some points with those


of the Burgundian laws and should be compared with them.[125]
The wergeld of women was double that of men of the same class.
In the Lex Salica and Lex Ripuariorum, women were paid for
threefold.
In the Lex Hlotharii, s. LXIX., the wergelds are stated as follows:—

If any freeman (‘liber’) kills a freeman, let him compound for him
twice 80 solidi to his sons. If he does not leave sons nor has heirs let
him pay 200 solidi.
Women of theirs, moreover, always in double.
The medius Alamannus, if he shall be killed, let 200 solidi be paid
to the parentes.

It is not clear that there has been any change in the wergelds
since the date of the ‘Pactus.’
The wergeld of the medius Alamannus, 200
solidi, is the same as before. That of the liber, 160 The wergeld of
160 solidi accords
solidi, seems to be the same as that of the baro de with the
mino flidis in the ‘Pactus.’ It is also the wergeld of statement in the
the Alamannus according to the clause mentioning Ripuarian law.
strangers in the Ripuarian law. The use of the term
‘medius Alamannus’ seems to imply that there should be a primus
Alamannus as in the ‘Pactus.’ But what these two classes of
Alamanni with higher wergelds than that of the liber were does not
appear.
This later statement of the wergelds seems also to contain a
provision which can, I think, only be explained by tribal custom. It
occurs again in clause XLVI., which enacts that the same payment
has to be paid to the parentes of a person sold out of the country
beyond recall as if he had been killed. This rule is the same in the
Salic and Ripuarian codes. But in this law a distinction is made
between the case of a slain man leaving an heir, and the case of his
leaving no heir.

If he cannot recall him let him pay for him with a Wergeld of 200
wergeld to the parentes. That is twice 80 solidi if solidi if no heir of
the person slain.
he leave an heir. But if he does not leave an heir let
him compound with 200 solidi.

The explanation must be that if the lost kinsman leaves no heir,


the loss is all the greater to the kindred. This looks like a survival of
tribal custom. The dread of a family dying out lay, as we have seen,
at the root of the widespread custom which brought in the sister’s
son to fill the vacant place when there was no one else to keep up
the family. This addition in the later statement, though omitted in
the ‘Pactus,’ pointing back as it appears to earlier custom, seems to
show that the Lex as well as the ‘Pactus’ may in the matter of
wergeld be traced to Alamannic rather than Frankish sources.
In both the ‘Pactus’ and the Lex, as we have
seen, the wergelds of women were double those of Wergeld of
women.
men. The Bavarian law gives the reason of the rule
(IV. 29) and also the reason why sometimes an exception was made
to the rule.

Whilst a woman is unable to defend herself by arms, let her


receive a double composition; if, however, in the boldness of her
heart, like a man, she chooses to fight, her composition shall not be
double.

In titles XXIX. and XXX. of the Alamannic law it is enacted that if a


man be slain in the curtis of the Dux a threefold wergeld must be
paid, and that if the messenger of the Dux be killed within the
province his triple wergeld must be paid.
In the Bavarian law the wergeld of the freeman
is stated to be 160 solidi, thus:— The freeman’s
wergeld of 160
solidi under
If any one kill a free man (‘liberum hominem’) let Bavarian law.
there be paid to his parentes, if he have any, or if
he have no parentes to the Dux or to him to whom he was
commended whilst he lived, twice 80 solidi: that is, 160 solidi. (Tit.
IV. c. 28.)

There are no wergelds mentioned in the Bavarian law


corresponding to those of the medius Alamannus and the primus
Alamannus of the Alamannic laws.
According to Tit. III. 1, there were certain
families who were held in double honour, and had Higher wergelds
of certain families.
double wergelds. The Agilolvinga had fourfold
wergelds, being the family from whom the Dux was chosen. The Dux
himself had a fourfold wergeld with one third added. If the life of
any of his parentes were taken the wergeld was, according to one
manuscript, 640, and according to another 600 solidi.
These wergelds of the Alamannic and Bavarian laws are not on all
fours with those of the Salic and Ripuarian Laws. But in both cases
the ordinary freeman’s wergeld is 160 solidi (unless there be no heir
to inherit), so that in both cases the wergelds correspond sufficiently
with the clause in the Ripuarian Laws which accords to them a
wergeld of 160 solidi, after having before stated that strangers are
to be judged according to the laws under which they were born.
In the Bavarian law there is special mention of
the freedman and the servus, and it is worth while Wergelds of the
freedman and the
to dwell a moment on the position assigned to servus.
them as compared with the ordinary freeman.
There are three titles headed as under:—

Title IV. De liberis, quo modo componuntur.


” V. De liberis qui per manum dimissi sunt liberi, quod frilaz
vocant.
” VI. De servis, quo modo componuntur.

These clauses relate to injuries as well as to homicide. As regards


all minor injuries, the freedman is paid for at one half, and the
servus at one third, of the payment to the liber for the same injury.
But when the payment comes to be for the eye,
hand, or foot, the difference is, roughly speaking, Payments for eye,
hand, or foot one
doubled. The payment for the liber is 40 solidi, for fourth the
the freedman 10 solidi, and for the servus 6 solidi wergeld.
(? 5 sol.). And these payments are seemingly
intended to be one quarter of the respective wergelds for homicide.
We have seen that the wergeld of the freeman was 160 solidi. These
clauses state that the freedman’s wergeld was 40 solidi, and that of
the servus 20 solidi, and that in both these cases the lord took the
payment.
In Tit. IV. 30, De peregrinis transeuntibus viam, the passing
stranger’s death was to be paid for with 100 solidi to his parentes, or
in their absence to the fisc.
The wergelds of the Bavarian laws may therefore
be thus stated:— Bavarian
wergelds.

Ducal family (4 fold) 640 solidi


Families next in honour 320 ”
Liber 160 ”
Stranger 100 ”
Freedman 40 ”
Servus 20 ”

And all these solidi were gold solidi of Imperial or Merovingian


standard, it does not matter much which.
The crime of homicide within the near family was
dealt with in the Alamannic law in conformity with No wergeld within
the family.
ancient tribal custom. There was no wergeld in
such a case.

If any man wilfully kills his father, uncle, brother, or maternal uncle
(avunculus), or his brother’s son, or the son of his uncle or maternal
uncle, or his mother, or his sister, let him know that he has acted
against God, and not fulfilled brotherhood according to the
command of God, and heavily sinned against God. And before all his
parentes, let his goods be confiscated, and let nothing of his pertain
any more to his heirs. Moreover, let him do penance according to the
Canons. (Tit. XL.)
Once more in these laws the parricide (the fisc having taken his
property) goes free, but for the penance required by the Canons of
the Church.
As regards the wergelds of the clergy in the
Alamannic law the Church seems to claim triple Wergelds of the
clergy.
penalties. The wergelds of the clergy are as
follows, according to the Lex Hlotharii (XI. to XVII.):—

Bishop as that of the Dux or Rex.


Priest, parochial 600 solidi
Deacon and monk 300 ”
Other clerics like the rest of their parentes.
Liber per cartam (the Ripuarian tabularius) 80 ”
The free colonus of the Church as other Alamanni.

According to the Bavarian law (Tit. I. c. x.) a bishop’s death was to


be paid for by the weight in gold of a leaden tunic as long as
himself, or its value in cattle, slaves, land, or villas, if the slayer
should have them; and he and his wife and children are to be in
servitio to the Church till the debt is paid.
The lower clergy and monks were to be paid for according to their
birth double; parochial priests threefold. (I. c. viii. and ix.)
In the Liber secundus of the Alamannic law is an
interesting clause which throws some light upon The wife’s
inheritance goes
the position of married women. back to her
kindred if no
children born
(XCV.) If any woman who has a paternal alive.
inheritance of her own, after marriage and
pregnancy, is delivered of a boy, and she herself dies in childbirth,
and the child remains alive long enough, i.e. for an hour, or so that it
can open its eyes and see the roof and four walls of the house, and
afterwards dies, its maternal inheritance then belongs to its father.
This is natural, but it seems to show that if the child had been
born dead and the wife had died without children her paternal
inheritance would have gone back to her kindred and not to her
husband.
In the absence of other evidence this is perhaps enough to show
that in accordance with tribal custom the kindred of the wife had not
lost all hold upon their kinswoman, and therefore that she by her
marriage had not passed altogether out of her own kindred.
Lastly, there are clauses in the same Liber
secundus which declare the value of the solidus in Traditional value
of cattle stated in
equation with cattle. gold tremisses.

LXXX. Summus bovus 5 tremisses valet. Medianus 4 tremisses


valet. Minor quod appreciatus fuerit.
LXXVII. Illa mellissima vacca 4 tremisses liceat adpreciare. Illa alia
sequenteriana solidum 1.

These clauses show that the solidi in which the wergelds were
paid were gold solidi of three tremisses.
In the Ripuarian laws the ox was equated with 2 gold solidi, i.e. 6
tremisses, so that we learned from the equation that the wergeld of
the Ripuarian liber, 200 solidi, was really a wergeld of 100 oxen. But
the above equations show that under Alamannic law the wergeld of
the liber was not so.
In the Alamannic laws the best ox was valued only at five
tremisses instead of six, so that the wergeld of 200 solidi of the
medius Alamannus was really a wergeld of 120 oxen; and the 160
solidi of the wergeld of the baro de mino flidis of the ‘Pactus,’ or
simple ‘liber’ of the Lex Hlotharii, was a wergeld of 96 oxen or 120
Alamannic ‘sweetest cows.’
Any one who has seen the magnificent fawn-coloured oxen by
which waggons are still drawn in the streets of St. Gall will
appreciate what the ‘summus bovus’ of the Alamannic region may
have been. Why it should have been worth in gold less than the
oxen of other lands does not appear.
CHAPTER VII.
TRIBAL CUSTOMS OF THE TRIBES
CONQUERED BY CHARLEMAGNE.

I. THE EFFECT UPON WERGELDS OF THE NOVA


MONETA.
We have reached a point in our inquiry at which
it becomes necessary to trouble the reader with The nova moneta
of Charlemagne.
further details concerning the changes in the
Frankish currency, made by Charlemagne.
We are about to examine the customs as regards wergelds of
those tribes which owed their laws, in the shape in which we have
them, to the conquests of Charlemagne. The alterations in the
currency, made literally whilst the laws were in course of
construction, naturally left marks of confusion in the texts relating to
wergelds, and we have to thread our way through them as best we
can.
The change which we have to try to understand
was in the first place a change from a gold to a A change from
gold to silver.
silver currency—i.e. from the gold currency of
Merovingian solidi and tremisses to the silver currency of
Charlemagne’s nova moneta.
There had been a certain amount of silver coinage in circulation
before, but the mass of the coinage had been hitherto gold, mostly
in gold tremisses.
In all the Frankish laws hitherto examined the monetary unit was
the gold solidus with its third—the tremissis. And the only question
was whether the solidi and tremisses were of Imperial or of
Merovingian standard—whether the solidus was the Merovingian
solidus of 86·4 wheat-grains and the tremissis 28·8, or the Imperial
solidus of 96 wheat-grains and the tremissis 32.
As regards the Lex Salica, originally the solidus
was probably of the Imperial standard, because the Merovingian kings
first used and
Merovingian kings at first in their coinage copied then imitated
the Imperial coins both in type and weight. And Imperial coin.
before they issued a coinage of their own they
made use of Imperial coins, both gold and silver. Numismatists point
in illustration of this to the fact that in the tomb of Childeric at
Tournay were found no Frankish coins, but a large number of Roman
coins, gold and silver, of dates from a.d. 408 to those of the
contemporary Emperor Leo I. (457-474). And for proof that these
Roman coins were afterwards imitated by Merovingian princes M.
Maurice Prou had only to refer the student ‘to every page’ of his
catalogue of ‘Les Monnaies Mérovingiennes.’[126]
Now, if the gold solidus was at first of 96 wheat-
grains, then the denarius (one fortieth) would be The denarius of
the Salic law first
2·4 wheat-grains of gold, and at a ratio of 1:10 the the scripulum and
denarius would be the scripulum of 24 wheat- then the
grains of silver, which was called by early Merovingian silver
tremissis of 28·8
metrologists the ‘denarius Gallicus.’ Further, at 1:12 w.g.
the denarius would become the Merovingian silver
tremissis of 28·8. So that probably the denarius of the Lex Salica
may originally have been the scripulum, and under later Merovingian
kings their own silver tremissis. Thus these silver tremisses had
probably been regarded as the denarius of the Lex Salica for a
century or two at least before Charlemagne’s changes.
Up to this time, therefore, there was apparently a distinct
connection between the reckoning and figures of the Lex Salica and
the actual Frankish coinage. The Merovingian coinage of gold and
silver tremisses of 28·8 wheat-grains was therefore, from this point
of view, so to speak, a tribal coinage for the Franks themselves, but
not one adapted for currency, over a world-wide Empire such as
Charlemagne had in view, and with which at last, when adopting the
title of Emperor, he had practically to deal.
The changes he made in the currency were intimately connected,
not only in time but in policy, with the extension of his kingdom and
his ultimate assumption of the Imperial title.
His raising of the weight of the Frankish gold
tremissis and silver denarius from the Merovingian Charlemagne, on
conquest of Italy,
standard of 28·8 to the Imperial standard of 32 raised the gold
wheat-grains was probably the result of his and silver
conquest of Italy. He seems to have arranged it tremissis to the
Imperial standard
with the Pope, for they issued silver denarii of the of 32 w.g.
higher standard with the impress of both their
names upon them.[127]
It was natural that he should wish his coinage to obtain currency
throughout his dominions, and this could not be expected if it was
continued at a lower standard than that of the Byzantine Emperor.
Not only in the currency, but also in other matters, extended
empire involved the breaking down of tribal peculiarities and greater
uniformity in legal provisions and practice.
To mention one instance suggested by our
previous inquiry, we have noticed how the The Lex Salica still
in force for
extension of Frankish rule in Gaul from the Loire to Franks. And its
the Garonne increased the difficulties of family holdings
maintaining two laws as to land. Strangers under not yet extinct.
Roman law, as in the ‘de migrantibus,’ one by one
were settling among Franks holding alods or family holdings of terra
Salica. Extended conquests reversed the process, and in conquered
provinces immigrants living under Salic law became strangers
amongst vicini living under Roman, Burgundian, or Wisigothic law.
The family holdings of terra Salica must have now become the
exception and not the rule. This becomes evident in the provisions
made for the army.
In the Capitulare of a.d. 803,[128] de exercitu promovendo, it was
ordered that every free man (‘liber homo’) who, de proprio suo or as
a benefice, had four mansi vestiti, that is mansi occupied by tenants,
should equip himself and attend ‘in hostem.’ And those not having so
many mansi were to club together so that for every four mansi a
soldier should be found. The possession of mansi had apparently
become sufficiently general to be taken as the typical form of
landholding.
In a.d. 807[129] special arrangements were made for the case of
the recently conquered Frisians and Saxons.
If help should be needed in Spain, every five of the Saxons were
to equip a sixth. If the need arose nearer home, every two were to
prepare a third. Or if the need arose still closer at hand, all were to
come. Of the Frisians, counts and vassals and those who held
benefices, all were to come, and of those who were poorer every six
were to equip a seventh. There is no mention of mansi in the case of
the Saxons and Frisians.
The Capitulare of a.d. 803 seems to show that in the longer settled
districts of the Empire the possession of so many mansi, de proprio
suo, was the prevalent form of landownership. So that, although the
lex Salica remained still in force, the number of Franks living under it
seems by this time to have borne a very small proportion to those
living under Roman and other laws.
Family holdings under the Lex Salica were, however, probably not
quite extinct. In the ‘Capitula generalia’ of a.d. 825[130] was inserted
the following clause providing specially for family holdings, which
may possibly have been holdings of terra Salica, though it is not so
directly stated.

De fratribus namque qui Concerning brothers who


simul in paterna seu materna together live in common in the
hereditate communiter vivunt, paternal or maternal inheritance,
nolentes substantiam illorum unwilling to divide their substance,
dividere, hac occasione, ut when occasion comes that one of
unus tantum eorum in hostem them only should go in hostem,
vadat, volumus ut si solus est we will that if there be one only
vadat: si autem duo sunt he should go, and if there be two
similiter: si tres fuerint unus the same: if there be three let one
remaneat: et si ultra tres remain; and if the number of
numerus fratrum creverit, unus brothers grows to more than
semper propter domesticam three, let one always remain on
curam adque rerum account of domestic care and to
communium excolentiam attend to their common concerns.
remaneat. Si vero inter eos But if among them any contention
aliqua orta fuerit contentio, quis shall have arisen which of them
eorum expeditionum facere ought to go on the expedition we
debeat, prohibemus ut nemo prohibit that any one of them shall
illorum remaneat. In ætate remain. During their lives also let
quoque illorum lex propria the lex propria be preserved. In
servetur. Similiter et in the same way let this condition be
nepotibus eorum hæc conditio kept to even among their
teneatur. grandsons.

When we reflect that the Franks living under the Lex Salica must
have thus sunk into a small minority, it becomes obvious that wider
views must of necessity have entered into the minds of Charlemagne
and his advisers, not only as regards land, but also as regards the
currency.
The currency of the Lex Salica, with its solidi of
40 denarii, was, as has been said, after all a local The currency of
the Lex Salica
one. And outside the old Frankish boundary, in the only a local one.
Wisigothic region, as well as probably in Italy, the
Roman currency or local modifications of it apparently more or less
prevailed. Ecclesiastics, as we have seen, even Alcuin himself, still
used the terms of Roman currency in writing on monetary matters to
their friends outside the Empire.
To them the denarius was still the Roman
drachma of 72 wheat-grains of silver, commonly The Roman
drachma or
called the argenteus, in contrast to the gold solidus argenteus of 72
or aureus. w.g. the silver
denarius of the
Gregory of Tours, when he has occasion to Empire.
mention monetary payments, speaks of aurei,
trientes, and argentei. In one story he speaks of solidi, trientes, and
argentei.[131]
Further, in a supplement to the laws of the Wisigoths[132] is a
statement under the name of Wamba Rex (a.d. 672-680), which
apparently represents the monetary system in vogue south of the
Frankish boundary. It states that the pound of gold equalled 72 gold
solidi, so that the gold solidus was not the Merovingian solidus but
that of Constantine. It then states that the ‘dragma’ of gold = ‘xii
argentei.’ The argenteus being the silver drachma, the ratio of gold
to silver was 1:12.
To Isidore of Seville, from his Spanish standpoint, the silver
drachma was still the denarius.[133]

Dragma octava pars unciæ The drachma is the eighth part


est et denarii pondus argenti, of an ounce, and the weight of the
tribus constans scripulis. silver denarius containing three
scripula.
Solidus apud Latinos alio The solidus with the Romans is
nomine ‘sextula’ dicitur, quod otherwise called the sextula
his sex uncia compleatur; hunc, because it is one sixth of the
ut diximus, vulgus aureum ounce; hence, as we have said,
solidum vocat, cujus tertium the vulgar call the solidus the
partem ideo dixerunt aureus, the third part of which is
tremissem.[133] called the tremissis.

Thus the solidus was the typical gold unit or aureus, and the
drachma was the silver denarius or argenteus.
It is remarkable that at a ratio of 1:10 twelve
Wisigothic or Roman argentei or drachmas of silver Twelve drachmas
of silver = at 1:10
equalled exactly in wheat-grains the Merovingian the Merovingian
gold solidus current on the Frankish side of the gold solidus.
Garonne or the Loire.[134]
It would seem, then, probable that traditionally and ‘according to
ancient custom’ outside the Frankish kingdom the Merovingian gold
solidus had been equated with twelve silver argentei or denarii of
this reckoning, whilst within Frankish limits 40 of the silver tremisses
and now of the pence of the nova moneta were reckoned as equal
to the gold solidus of the Lex Salica.
But even to the Frank the 40 denarii of the Lex Salica may have
become antiquated except for wergelds and other payments under
its provisions.
The practice apparently had already grown up of
reckoning 12 of the silver tremisses as a solidus of The silver solidus
of 12 silver
silver, twenty of which went to the pound of 240 tremisses already
pence, without, however, any pretence being made in use in
that this solidus of twelve silver pence was to be accounts, as 1/20
of the pound of
reckoned as equal to the gold solidus in making silver of 240
payments. pence.

In the ‘Capitulare Liftinense’ of a.d. 743[135] a payment is enacted


de unaquaque cassata solidus, id est 12 denarii. It was necessary to
make this explanation.
It is not known how much earlier the practice of reckoning in
pounds of silver of 20 solidi of 12 denarii came into vogue, but it
was long before the issue of the nova moneta.
It might at first sight be thought that these twelve denarii may
have been twelve argentei or drachmæ, but 240 drachmæ would
make far more than a pound. And by an edict of a.d. 765[136] Pippin
had enacted that out of a pound of silver not more than 22 solidi
were to be made, one of which was to go to the monetarius, and
this clearly forbids the supposition that the solidus could be of
twelve drachmæ. The pound would contain only eight such solidi.
Another Capitulare of a.d. 779[137] proves that the twelve denarii
were Merovingian denarii of 28·8 wheat-grains.[138]
The issue of the new denarii of 32 wheat-grains was apparently
made before a.d. 781, for in that year an edict was passed forbidding
the currency of the old denarii.[139]
There was nothing very remarkable in this raising
of the silver denarius from 28·8 to 32 wheat-grains. The pound of the
nova moneta was
It was merely adopting the Imperial standard. But 240 pence of 32
the extraordinary thing was that Charlemagne w.g. = 7680 w.g.
seems to have thought that he could, by law,
substitute the solidus of 12 of his silver denarii for the gold solidus
hitherto in use. The gold currency was going out and the silver
currency was taking its place; but it was quite another thing to make
the solidus of 12 silver denarii of 32 wheat-grains legal tender in the
place of the gold solidus of the Lex Salica of 40 silver denarii of 28·8
wheat-grains. Yet this was what Charlemagne did, though perhaps
only by degrees.
The change was made under the pretence of the
sanction of ancient custom. In the addition made Charlemagne
enacted that the
to Tit. XXXVI. of the Ripuarian law the wording of silver solidus
the clause as to the payment of wergelds was should be legal
‘Quod si cum argento solvere contigerit, pro solido tender for the
gold solidus.
duodecim denarios, sicut antiquitus est
constitutum.’ And this allusion to antiquity was repeated.
What was meant by this appeal to ancient custom it is not easy to
see, unless it might be the probably long-established equation
already mentioned between 12 Roman drachmas or argentei and the
Merovingian gold solidus. Very possibly this equation was older than
that of the 40 denarii to the solidus of the Lex Salica.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like