Calculated data type, 222
CalculateSalesTax function, 43–45
Calendar control, 306, 307
call stack, 70
Cancel parameter, 90
Caption properties for command buttons, 115, 118
Caption property
changing at runtime, 81
changing for a label, 115, 118
changing for command buttons, 142
of a command button, 86
of a command button control, 95
of a list box, 95
setting for a form, 80
Catalog object, 177
CE devices, managing a SQL Server database, 255
cells, assigning values to, 298
Cells property, 298
child class, 122
Choice data types, 222
Choose Builder screen, 21, 22, 38
class, 115, 121–122
class diagrams, 102–105
class hierarchies, 122
class modules
advanced techniques, 121–123
building for objects in Project Tracker, 357
creating custom objects, 101
creating objects, 101–123
for Customer Service application, 481–488
defined, 101
described, 29
inserting new, 102
public variable declarations, 105
writing code in, 37–42
Classes list, limiting, 91, 92
ClearContactsControls procedure, 447
ClearControlsOnForm procedure, 146–147, 154
ClearObject procedure
adding to clsCustomer class module, 487–488
adding to clsProjects class module, 365, 370, 377–378, 382–383
ClearProjectControls procedure, 420–421, 435
Click event
adding code for, 120
adding to a class, 116
for a command button, 90
Click event procedures
adding to command buttons, 413–414, 429–431
adding to frmProjects, 411–413, 428
extracting data, 91
managing comments, 416–417, 431
managing contacts, 415–416, 430–431
running a search, 501–503
client cursors, 134
client machine, 13
client-server applications, 13–14
client-server architecture, example of, 253, 254
CloseDbConnection procedure, 390, 405, 493
cls prefix, 56
clsCar class
methods for, 112–113
properties for, 107–111
clsContacts class module, 372–383
clsCustomer class module, 482–488
clsProjects class module, 358–372
cmdAddAttachment_Click event, 417–418, 431–432
cmdAddNew_Click event, 442–443, 449–450
cmdAddNew_Click event procedure, 411–412, 428
cmdAddToProject_Click event, 442, 449
cmdDeleteContacts_Click procedure, 415, 430
cmdEmailContact_Click procedure, 415–416, 431
cmdFileBrowse_Click event, 417–418, 432
cmdManageContacts_Click procedure, 415, 430
cmdMoveFirst_Click event, 444–445, 450
cmdMoveFirst_Click procedure, 413, 429–430
cmdOpenFile_Click event, 418, 432–433
cmdRun_Click event procedure, 40
cmdRun_Click procedure, 37, 39
cmdSave_Click event procedure, 412, 428
cmdViewContact_Click procedure, 416, 431
code
debugging, 66–71
documenting, 63–64
encapsulating into objects, 101
running and debugging, 24–25
separating into logical tiers, 18, 103
stepping through, 66–68, 512
Code Builder
choosing, 84
creating a procedure for an object, 37–40
selecting, 95
writing code for an event, 86–87
Code Builder option, 21, 22
code execution, 69
code library, 308–312
code modules. See modules
Code window
adding code to, 21, 23
creating additional procedures, 40–42
in Visual Basic Editor, 19, 20
CodePage parameter, 206
collections, 80, 94–100, 130
column-level security, 271
columns, selecting in a table, 160
combo boxes, 188–193
comma-delimited records, 207–208
command(s)
displaying options for, 21, 23
typing in the Code window, 21, 23
writing within procedures, 56
command bar, creating a custom, 288–291
command button control, 94, 95
Command button, properties of, 86
command buttons
adding to a form, 142, 150
Click event for, 90
creating a switchboard form, 186
drawing on a form, 29, 30
command completion feature, 112
Command object
assigning to an open connection, 132
declaring and instantiating, 132
declaring a new, 167, 173
setting to the existing connection, 167, 173
CommandBar object, 100
CommandBars collection, 288
CommandBars property, 288
CommandText property
assigning to a SQL statement, 167, 173
assigning to the SQL statement, 169, 175
of the Command object, 518
comments, saving to the database, 439
Comments/Tasks tab, 336, 337
CommitTrans method, 314
compacting Access databases, 331
comparison operators in a Where clause, 161
compile errors, 64, 65
compiling applications, 330
conditional If statements, 59
connected recordsets, 132
Connection object
adding code for, 150
in the ADO object model, 131
declaring, 131, 138
instantiating, 131
opening, 131
connection string, 132, 138
connection string variable, 150
connections, opening, 138, 167, 173.
See also database connections
Connectors in an Activity Diagram, 7
Const statement, 53
constants
built-in, 54
creating in VBA, 53–54
declaring and using, 53
defined, 53
limiting a property value to, 122
scope and lifetime of, 54–55
consuming program for web services, 214
Contact object, class for, 357
contacts
adding to project records, 442, 449
displaying, 452–453
procedures for saving to the database, 439
sending a letter to, 298–302
as a SharePoint list, 221
Contacts class, 372–383
Contacts form
building for Project Tracker, 440–451
to connect and display data from a recordset, 134–140
opening, 453, 455
Contacts list, 227–229
Contacts prototype form, 341
Contacts screen
designing, 335–336
with one filtered record, 453, 455
prototype for, 339–340
Contacts tab, 338
ControlExcel procedure, 296, 297
ControlOutlook procedure, 303–304
controls
adding to forms, 344–357
adding to reports, 238–241
aligning on forms, 197
creating for reports, 245
populating with the current record, 167, 174
working with, 187–195
Controls ribbon, 306
ControlSource property, 139
ControlWord procedure, 299–300
copies, number for printing, 247
Create Back-End Database dialog box, 320, 321
Create New Database option, 277, 279
CREATE PROCEDURE statement, 470
Create ribbon
Create Module option, 30, 32
selecting Macro, 46, 47
selecting Module, 19, 20
CreateCommandBar function, 289
CreateCommandBar procedure, 290
CreateComplaintsReport procedure, 242–244
CreateObject method, 295
CreateParameter method, 517
CreateReport method, 238, 245
CreateReportControl method, 238–241, 245
cross-reference tables
deleting records from, 397–398, 409
inserting records into, 398–399, 409
cur (Currency) prefix, 55
Currency data type, 43, 50, 221
CurrentProject object, 97
cursor, type of, 325
CursorLocation property, 133–134
CursorType property, 133, 143, 151
custom button, adding to a command bar, 291
custom class modules, 357, 482
custom event, 120–121
custom groupings, 2
custom lists in SharePoint, 221
custom methods, 125–126
custom objects, 102
custom properties, 124–125
custom ribbons, 2
custom toolbar, 247
Customer class, 482
customer history record, 471–472
customer records
code for adding, 506–507
code for navigating, 508–509
code for populating, 509–511
updating an existing, 473–474
Customer Search form, 500
Customer Search screen, prototype for, 464
Customer Service application
building the class module for objects, 481–488
building the database and database objects, 465–475
connecting the user interface to the code, 499–512
design specifications, 461–465
standard modules, 488–499
touring the finished, 512–518
user interface, 475–480
customers, retrieving information on, 473