cis 245 final review
TRANSCRIPT
![Page 1: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/1.jpg)
CIS-245 FINAL REVIEW
![Page 2: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/2.jpg)
FORM DESIGN GUIDELINES Provide meaningful title Organize fields logically Use appealing form layout Include familiar field labels Be consistent with terminology and
abbreviations
![Page 3: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/3.jpg)
FORM DESIGN GUIDELINES – 2 Allow for convenient cursor movement Prevent and correct errors Include explanatory messages for fields
![Page 4: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/4.jpg)
USING FORMS Bound form has a Record Source
Displays data from fields in record source Unbound forms
Do not have record sourceDesigned to help users navigate through
database
![Page 5: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/5.jpg)
SUBFORMS Subform is a form embedded in another
form Primary form (called main form)
Usually has one-to-many relationship with data in subform
Main form and subform linked Subform displays only records that related
to current record in main form
![Page 6: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/6.jpg)
COMMAND BUTTONS Command buttons
Users click to perform common tasksCan contain Text, Icons, Graphics
CreateUsing Command Button Wizard By adding button to form then setting
properties Be consistent when creating command
buttonsLocation on formOrder
![Page 7: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/7.jpg)
TAB ORDER AND TAB STOP Form created with form tool or Form
Wizard Places fields in order they appear in table
design After fields are rearranged for more
logical data entry, correct tab order Test each form!
![Page 8: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/8.jpg)
PARAMETER QUERIES Way to change query ‘on the fly’ Can use prompt for user Can get information from form controls
Forms!FormName!ControlName
![Page 9: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/9.jpg)
USING LISTS List controls: set rowsource
ListboxCombobox
Forms: set recordsource Reports: set recordsource Remember to requery!
Find right event to respond to
![Page 10: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/10.jpg)
REPORTS Grouping: When RecordSource has all of
the data needed, and all needed records are included
Sub-reports: When need data that’s not part of RecordSource OR RecordSource wouldn’t include all records
Use CanGrow, CanShrink
![Page 11: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/11.jpg)
REPORT EVENTS Limited number Most deal with laying out and formatting
data Use NoData instead of showing an
empty report
![Page 12: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/12.jpg)
DOMAIN FUNCTIONS Also called Domain Aggregate Functions Allows creation of summary information
without a queryDCountDSumDMax
![Page 13: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/13.jpg)
DOMAIN FUNCTION SYNTAX Need a field to work with Need to specify where the field is found
(table or query) Can optionally add a ‘where’ clause to
limit the records included
DCount(“PatientID”,”Visits”,”Total<100”)
![Page 14: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/14.jpg)
EVENT-DRIVEN APPLICATIONS Have to choose which event to respond
to Events can be generated by the user or
changes in data or objects
![Page 15: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/15.jpg)
VISUAL BASIC FOR APPLICATIONS Many commands start with ‘DoCmd’ Code is organized into procedures
Property Procedures Functions Subroutines
Procedures can use arguments to pass data Use With … End With when referring to an
object several times
![Page 16: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/16.jpg)
BANG & DOT OPERATORS Two methods to reference “owned”
objects Use ! (bang) if referring to a control in a
query In code, can use both ! (bang) and .
(dot) If referring to fields in a recordsource, use ! If referring to controls can use either
![Page 17: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/17.jpg)
USING VARIABLES Scope: How long a variable lasts and
where it can be accessed Forcing declaration: Option Explicit Objects: Can represent more than just
basic data, can create object variables Need to create an instance – New keyword Use Set to make an assignment
![Page 18: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/18.jpg)
COLLECTIONS Most objects are members of some
group A collection is a group of like objects
Forms collection holds all formsA form’s controls collection holds all
controls that belong to that form
![Page 19: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/19.jpg)
DECISION-MAKING Branching (what’s next?)
If-ThenSelect Case
Loops (repeating a task)For … NextFor .. EachDo WhileDo Until
![Page 20: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/20.jpg)
WHERE CONDITION Optional argument for many commands When opening a form or report, can limit
the records to be used, even if the recordsource is a table
DoCmd.OpenForm “frmName”,,,”field=1”
![Page 21: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/21.jpg)
ERROR HANDLING Logic errors
Runs but doesn’t give the right results Syntax errors
Compiler can’t process your code Run-time errors
Problem happens during executionUse On Error to respond to
![Page 22: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/22.jpg)
DATA MODELS ADO: ActiveX Data Objects
For working with dataNot hierarchical
ADOX: ADO ExtensionsFor working with databaseFor security and database
DAO: Data Access ObjectsFor working with dataUsed in Forms, Reports by AccessHierarchical (must know how each item fits
in relation to others)
![Page 23: CIS 245 Final Review](https://reader035.vdocuments.site/reader035/viewer/2022062418/555e076fd8b42a9e188b47b1/html5/thumbnails/23.jpg)
ADO PRINCIPAL OBJECTS Connection: ‘pipe’ for moving data Command: what data to work with Recordset: local copy of data from a
table or query