[FREE PDF sample] Microsoft Access VBA Programming for the Absolute Beginner Michael Vine ebooks
[FREE PDF sample] Microsoft Access VBA Programming for the Absolute Beginner Michael Vine ebooks
com
https://ebookname.com/product/microsoft-access-vba-
programming-for-the-absolute-beginner-michael-vine/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/python-programming-for-the-absolute-
beginner-3rd-edition-michael-dawson/
ebookname.com
https://ebookname.com/product/microsoft-visual-basic-2008-express-
programming-for-the-absolute-beginner-1st-edition-ford/
ebookname.com
https://ebookname.com/product/microsoft-windows-
powershell-2-0-programming-for-the-absolute-beginner-2nd-ed-edition-
jerry-lee-ford/
ebookname.com
https://ebookname.com/product/the-american-people-in-the-great-
depression-freedom-from-fear-part-one-1st-edition-david-m-kennedy/
ebookname.com
https://ebookname.com/product/statistics-for-business-and-
economics-1st-european-edition-carlos-cortinhas/
ebookname.com
https://ebookname.com/product/aircraft-carriers-of-the-world-1914-to-
the-present-roger-chesneau/
ebookname.com
https://ebookname.com/product/aircraft-fuel-systems-roy-langton/
ebookname.com
https://ebookname.com/product/pathological-anxiety-emotional-
processing-in-etiology-and-treatment-1st-edition-barbara-olasov-
rothbaum/
ebookname.com
Structures in the Universe by Exact Methods Formation
Evolution Interactions 1st Edition Krzysztof Bolejko
https://ebookname.com/product/structures-in-the-universe-by-exact-
methods-formation-evolution-interactions-1st-edition-krzysztof-
bolejko/
ebookname.com
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
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
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
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
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.
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.
Access
Essentials
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.
• 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.
Fortunately for him, however, he was quick of eye and wit, and nimble in
his movements. At school he had had no match in boxing and fencing. Being
absolutely unarmed, he had no means of parrying the stroke; but he dropped
on one knee, and the scimitar whistled within an inch of his crown, striking
with a crashing stroke the wall on his right hand.
While the negro was still bent forward with the force of his blow, Royce
sprang low at his knees, and, tugging them towards him, brought the man
with a thud to the floor. The sword fell from his hand and clashed on the
stone flags, and Royce reached down to get hold of it. But the negro sprang
to his feet with agility amazing in so huge a man, and hurled himself upon
the Englishman.
Royce had just time to straighten himself and prevent himself from being
thrown down; the next moment the negro's arms were about him; he felt hot
breath upon his face, and saw the gleaming teeth and infuriated eyes of a
man from whom he knew he could expect no mercy.
The encounter, the coming to grips, had happened so swiftly that Royce
had had no time to think that there was help at hand in the shape of John. But
now, at this critical moment, when he felt that the very life was being
crushed out of him, he remembered the staunch companion of his journey,
who could not be far away.
The encouraging sound gave Royce new strength. He put forth his last
energies to resist the strangling grip.
"Yoi-aloo! Yoi-aloo!"
The newcomer was close at hand. The panting negro lowered his arms,
caught Royce about the hips, and tried to lift him, intending to dash him
upon the floor. Royce flung his legs about the giant's thighs, stiffened his
muscles, and dragged with all his force upon the negro's shoulders.
"Yoi-aloo! Yoi-aloo!"
The game was up! The negro dared not wait longer. Loosening his grip,
he wrenched himself out of Royce's entwining arms, thrust him away, and,
turning about, rushed through the passage into the open. There he saw John
hurrying up within twenty paces of him, and swerving to the left, in five
seconds had disappeared among the bushes.
CHAPTER III
THE STORY OF GORUBA
Royce, when the negro left him, was breathless from the struggle. But he
had the presence of mind to run back to the room where he had passed the
night, pick up his rifle and revolver from the floor, and hurry to the entrance.
There John met him. The anxious alarm on the Hausa's face gave way to a
broad smile when he saw that his master was safe.
"Where is that ruffian?" asked Royce, looking round for his assailant.
"Him run away quick," replied John, pointing to the bushes. "Berry much
'fraid of me."
"You were just in time, John. He was crushing me to a jelly. It's a lesson
to me not to part with my revolver for an instant. You saw no other black
men about?"
"A giant! I am bruised all over. I met him as I was coming out for a bathe,
and he sprang at me at once. Why should he do that?"
"I daresay; but it was something more than original sin. He went for me
with as much ferocity as an eagle whose nest I disturbed once. Does this
place belong to him, I wonder?"
John could only repeat that the man was a "bad fella." But Royce felt a
good deal puzzled. The negro's savage onslaught might be explained by his
regarding the white man as a robber, but there appeared to be nothing in the
place worth stealing. It was strange that he should have so fiercely resented
what was, after all, an innocent intrusion.
"We'll have another look round before we start," said Royce. "Or, rather, I
will. You keep guard at the doorway, John, and call me if you see anyone
moving about outside."
Royce searched the building thoroughly. The result confirmed his
overnight impression, that it was in a fair state of preservation. But there was
nothing in any of the rooms to indicate present or even remote occupation.
Except for fragments of stone and rubble, they were bare. There was nothing
to tempt a robber. Royce could only conclude that the man had attacked him
from an instinct of self-preservation. What had led him to enter the building
was a mystery.
Royce returned to John, who during his absence had kindled a fire,
skinned the rabbit, and set it to roast. They made a good breakfast, then
started in the direction of the village where Royce hoped to purchase food
for his men.
"We must keep a good look-out," he said, "in case that fellow should be
one of a band prowling about here. He won't be difficult to recognise. There
can't be many men of his height and size. And if there were, I should know
him again by some strange marks on his face. Why do these black men gash
themselves, John?"
It was late in the afternoon, and they were very tired, when at last they
struck into a narrow, beaten track, far to the left of their original course.
"It's a town, after all," said Royce; "not a village. So much the better, if
the people are friendly. Give them a call, John."
JOHN ADDRESSES THE SENTRY
The Hausa let out his long yodelling cry. A head was seen peering over
the top of the wall. John lifted both hands, and spread them, palms open, as a
sign of friendliness; then began an address in the native tongue, somewhat as
follows:
"Ho, you admirable watchman of a noble chief! Tell your kind and
worthy lord that a stranger from the lands of the Great White King seeks to
look upon his face, and have a friendly talk with him. My lord and master is
a very great man, with horses and cattle in number as the grains in a
cornfield, and it is a great honour that he does to your chief. Open, then,
your gate, and let this great lord enter; and, as he passes, let your people fall
to the ground, and throw earth upon their bodies, as befits folk who are but
as worms in his sight."
"What is it all about?" asked Royce, beginning to suspect that his man
was growing impolite.
"Son of a dog, dat fella!" replied John indignantly. "He want to know too
much. Talk 'bout sah's father and mother, how many wives, what he come
for, too much!"
In a more subdued tone of voice, John gave his message. The man again
withdrew.
After another interval, the gate was thrown open, and Royce, entering,
found himself among a band of stalwart natives, carrying long, broad-bladed
spears, and marked on each cheek, near the ear, with five or six narrow cuts,
the badge of their tribe. Escorted by them, and watched by a curious crowd
of townsfolk, Royce proceeded to the chief's large mud house in the centre
of the town.
On entering he was greeted with the words: "Sanu, bature!" (Hail, white
man!) from a stout, pleasant-faced, bearded black man, somewhat past
middle age, who motioned to him to be seated, and ordered one of his slaves
to bring forward a present of a roasted fowl.
The customary salutations passed between host and visitor. Royce had
already learnt to endure this lengthy ceremony with patience. It was
something like this:
Royce then explained the object of his visit, instructing John to translate
exactly what he said, without adding or subtracting anything. The chief at
once agreed to sell a quantity of millet and manioc for the men, and to
present Royce with a few dozen eggs—an offer which Royce gracefully
accepted, though he knew that most of the eggs would turn out to be bad.
The African native can never understand the white man's squeamishness in
the matter of addled eggs.
The next question was about the transportation of the food to the camp,
nearly twenty miles distant. At first the chief, for fear of the Tubus, was
reluctant to supply carriers. But when Royce explained that there had been
no sign of Tubus on the way, and that the area of their depredations appeared
to be considerably to the west, he yielded, and gave orders for the food to be
loaded into calabashes, and for a dozen slaves to be ready to start with them
in the morning.
It was clearly too late for a start to be made that evening, though Royce
was very anxious to get back to his friend. He accepted the chief's hospitality
for the night, and, though very tired, kept up a tedious conversation with him
through John. In the course of this he related the incident of the early
morning.
"I will tell the white man—my friend. Years ago I was chief of only a
small village, and lord of little wealth. And I sought to increase my wealth
by prudent trading, to which end I hunted the elephant, and sold his tusks to
merchants from the East. And one time, having got together some few tusks
in readiness for the barter, I was beset in my village by a horde of strange
warriors, armed with guns, a terror to all my people. And these evil-doers
came to me and made me captive, and demanded that I should deliver up to
them those few tusks which were the spoil of my hunting. And, when I
refused, they treated me shamefully and cruelly, so that I bear the marks on
my body to this day. And there was no help for me, no hope of deliverance;
and then, for the safety of my life, I was fain to yield, and saw myself robbed
of the treasure that had fallen to my spear.
"And the captain of those wretches, he that put me to the torture, was a
man of vast stature and the strength of a giant, Goruba by name. He was
from the east country, the slave of Rabeh, King of Dar Runga, who laid
waste all the lands on this side of the great lake, and whose warriors were as
locusts on the face of the earth.
"It was a good day for all this country when Rabeh was slain, and his men
were scattered to the winds. I knew not what had become of Goruba, one of
his chiefest captains; but in very truth it was he that laid hands on you, for
his stature and those marks upon his cheeks betray him. And this news that
you give me is heavy upon my heart, for without doubt Goruba is again
prowling like a lion about these lands, and many a village will fall a prey to
him."
Royce did his best to reassure the chief, pointing out that Goruba had
been alone, and there was no evidence that he was the leader of any
considerable body of men. This somewhat heartened the old man, who
declared, however, that he would henceforth be doubly watchful, and
advised the white man to leave the country as soon as possible.
"I shall go at my own time," said Royce quietly. "I thank you for your
warning, and will do what I can to repay your kindness."
Next morning he left the village with John and a dozen carriers, well
loaded with food-stuffs, and hastened at his best pace to rejoin his friend.
CHAPTER IV
RUSHED BY TUBUS
Challis, after Royce had left him, felt somewhat uneasy. Royce had
spoken hopefully of getting back on the following day, but Challis,
remembering the difficulties of finding the way in a strange country, was
pretty sure that Royce had overestimated his powers, and was prepared to be
left in sole charge for at least two days, and perhaps three. It was not a
pleasant prospect, for the raiders could not be very far away, and the
possibility of being attacked was disturbing. He kept a smiling face,
however, and said nothing about his anxieties to the boys.
The spot which Royce had suggested as suitable for the camp was a
knoll, on which a few palm-trees grew, at one end of the village, and Challis
was rather surprised to find that, during his conversation with Royce, the
Hausas had not made a start. Wearing woe-begone expressions on their
faces, they were squatting beside their packages.
"Now, Kulana," said Challis to the second in command, "what are you all
idling for? Carry the stuff to those palm-trees yonder."
The men got up obediently, but they appeared to have a strange hesitation
in lifting their loads.
"Come, come!" said Challis. "I know that you are done up, but you are
not so bad as all that. Besides, it's only a few yards away, and the sooner we
form camp the sooner you'll get to sleep."
There was a murmuring among them. Still they did not offer to lift the
bundles.
Challis curbed his rising anger. The men were usually so willing that he
wished not to be hard on them. And both Royce and he had already taken
much interest in studying the queer moods and ideas of these Africans.
The Hausa looked him full in the face, and, seeing no anger there,
replied:
And then the man began to pour out an explanation of which at first
Challis could make nothing. Kulana's English was not adequate to express
his thoughts. He talked of "debbils" and "bad medicine," and went through a
pantomime of gestures expressing fear and fright, the other men listening
intently, and murmuring approval now and then.
"You think the spirits of the dead men haunt the village—is that it? And
you are afraid they will come and bother you during the night?"
"Sah savvy all 'bout it," said the man, delighted that his meaning was
understood.
The others clapped their hands, and looked much more cheerful.
"Well, I don't want you to see black ghosts, I'm sure," Challis went on. "I
don't know that I'd like to see them myself. We'll find another place."
The men shouted, and springing to their feet, hoisted their loads with
alacrity. Challis reflected that the work of constructing a camp more in the
open would be good for them, preventing them from brooding over their
troubles, real and imaginary.
After a rapid glance around, he led them to an open spot at some little
distance from the village, and ordered them to make a small zariba with
branches from the bushes around. It was an excellent situation for a camp.
Its openness rendered it possible to detect the approach of an enemy, and a
small stream running close by furnished an ample supply of water.
As he had expected, the work of cutting the bushes took the men's minds
from their misfortunes. They soon began to chatter with their usual
cheerfulness. By nightfall they had constructed a thick fence six feet high
and several yards square. The tent was erected in the middle of the
enclosure, the baggage was placed against one of the walls, and the men,
tired out, but no longer despondent, were ready for their supper.
Challis dealt out pills to the ailing ones, promised them all a long rest on
the following day, and spoke confidently of the speedy return of his
companion with ample supplies. He arranged for the watching of the camp
during the night, and, as an extra precaution, set his alarm clock, when he
himself turned in, so that it wakened him in an hour. Then he took a look
round, set the clock again for an hour ahead, and so on, through the night.
He enjoyed the inestimable power of sleeping at any minute.
The night passed quietly. In the morning, Challis sent two of the men
outside the zariba to fetch water and to take a look round.
When they returned they were rather excited. They explained that they
had made two discoveries. One was that across the stream lay an extensive
swamp, upon which they had seen a large flock of birds pecking for worms.
The other was that a little farther off was a banana plantation, which had
escaped the ravages of the raiders.
"Good boys!" said Challis. "We will make some use of your news by and
by."
The swamp was half-a-mile away, and Challis found it necessary to walk
round it for some distance before he could get a fair shot at the birds, which
had settled down in a bed of rushes. They appeared to be a variety of pigeon,
a delicacy which the men would appreciate after living almost wholly on
meal.
When he had located the game, he sent his men forward to start them.
The instant they rose in the air he let fly with both barrels in rapid
succession, and brought down a bird with each shot. Following up the rest of
the covey until they settled again, he killed another brace, and so went on for
nearly an hour, until there were as many birds as the men could carry.
His success had quite banished the misgivings with which he had started.
Picturing the delight of his boys at getting a whole day's good eating, he had
given the order to return, and was half-way back to camp, when he was
startled by a great shouting and commotion from its direction.
Sprinting on at full speed, he was just in time to see a number of his boys
running across the open space in front of the zariba, closely pursued by a
dozen horsemen. The runners, who appeared to be laden with bananas,
darted into the enclosure through the gap they had left in the fence; but
before they could draw the rough gate across it, the foremost horsemen
galloped through at their heels.
Challis guessed in a moment what had happened. The men's appetite had
been whetted by the report of the nearness of a banana plantation. They had
been too childishly impatient to await his return, and, either with Kulana's
consent or in defiance of him, they had gone out to gather the fruit, only to
be surprised by some wandering tribe.
He rushed impetuously across the open space to the support of his men,
not staying to reflect that he could do nothing really effective. Besides his
shot-gun, he carried a revolver. The horsemen had fire-arms, which they had
not used as yet, feeling no doubt that their swords were sufficient for the
work in hand. Some of the Hausas had rifles, but it was clear that they were
too much paralysed by the appearance of a mounted enemy to make use of
them. They were yelling with fright.
Challis opened dazed eyes upon a scene that bewildered him, and for a
few moments he could not account for the pains that gripped all his limbs.
Remembrance stole back into his reviving consciousness, and gradually he
became aware of the meaning of what he saw.
The zariba had been demolished. At one side of what had been his camp a
number of horses were tethered. In the centre his Hausa boys were busily
packing the baggage, much more rapidly than Challis had ever seen them
doing it before. The reason of their haste was easily discovered. Over them
stood a circle of negroes, who urged them with fierce cries and drawn
swords. The camp had fallen into the hands of an enemy.
And it was not long before Challis guessed who this enemy was. Only
one tribe in this part of Africa, so far as he knew, rode horses. These men
must be Tubus from across the Yo—the ruthless brigands who were the
terror of the country. It could hardly be doubted that these were the men who
had raided the village, and left only too clear proofs of their merciless
ferocity.
Apparently there had been no fight at the zariba. The Hausas, armed
though they were, had succumbed without a struggle. The truth was that, in
disobedience to Challis's order, some of the men had left the camp, and been
pounced on suddenly by the enemy. As they fled back to the zariba, their
comrades dared not fire for fear of hitting them, and the swift onset of the
horsemen had made resistance hopeless.
Aching all over, Challis struggled to his feet. Immediately a hand was
laid upon him from behind. He noticed that his wrist was bleeding, and
taking out his handkerchief, he began to wind it round the wound as his
captor pushed him towards the centre of the camp. And then from behind the
horses there came forth a huge negro, taller than he by six or seven inches,
with massive shoulders and muscular arms.
The giant's face broke into a grin as he approached the Englishman. He
uttered some words which Challis did not understand, but which seemed to
have in them the ring of triumph.
As to the white man all negroes seem at first alike, so to Goruba Challis
at this moment appeared to be the man with whom he had wrestled at dawn
of day.
Though he made no reply, it was plain that he showed his surprise in the
expression of his face, for Goruba looked hard at him, and seemed to be in
some puzzlement himself. Then the negro's harsh features darkened with
anger. He flourished his sword.
Challis looked at him, without quailing, and did not flinch when the
sword was flashed across his eyes. His courage seemed to impress Goruba,
who laughed, spat on the ground, and giving an order to his men to keep
guard over the prisoner, walked away with Kulana into the midst of the
sweating Hausas.
What he had failed to elicit from the Englishman his threats soon
extracted from the carriers. He learnt that there was another white man, who
had set out on the previous afternoon for a village to the north, to buy
provisions. He chuckled on receiving this information. There was little doubt
what village the white man he had met in the fort was bound for. He
chuckled again. The white man was no doubt on his way back to the camp. It
would not be difficult to waylay him.
Often on that march Challis's blood boiled as he saw how his men were
treated, and knew his helplessness to defend them. The Tubus urged them
with whips, sometimes with the points of their swords. The wretched
Hausas, some of whom were weak with sickness, panted along under their
loads, striving to keep pace with the impatient horsemen. They dared not
even groan, for a murmur brought the lash on their shoulders. When Challis
protested through Kulana, explaining that the men were ill, Goruba only
grinned and mocked him.
Challis himself was in little better case. He had not been given a load to
carry, but he had felt himself growing weaker and weaker as the day wore
on. Though his wound was not serious, he had lost some blood, and was
enfeebled by the shock and the bruises he had suffered in the trampling.
When he lagged on the march, the man to whose saddle he was fastened
prodded him in the back with the point of his spear. His own sufferings, and
the sufferings of his men, made him realise with new force the horrors of
slave-driving, which, in spite of all efforts to crush it, still exists in parts of
the dark continent.
The Tubus fetched water from a small water-hole near by. They made a
meal of the provisions carried in their wallets. The Hausas consumed the last
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.
ebookname.com