SlideShare une entreprise Scribd logo
1  sur  23
 Provide meaningful title
 Organize fields logically
 Use appealing form layout
 Include familiar field labels
 Be consistent with terminology and
  abbreviations
 Allow for convenient cursor movement
 Prevent and correct errors
 Include explanatory messages for fields
 Bound   form has a Record Source
    Displays data from fields in record source
 Unbound    forms
    Do not have record source
    Designed to help users navigate through database
 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
 Command     buttons
    Users click to perform common tasks
    Can contain Text, Icons, Graphics
 Create
    Using Command Button Wizard
    By adding button to form then setting properties
 Beconsistent when creating command
 buttons
    Location on form
    Order
 Formcreated 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!
 Way to change query „on the fly‟
 Can use prompt for user
 Can get information from form controls
    Forms!FormName!ControlName
 List   controls: set rowsource
     Listbox
     Combobox
 Forms: set recordsource
 Reports: set recordsource
 Remember to requery!
     Find right event to respond to
 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
 Limitednumber
 Most deal with laying out and formatting
  data
 Use NoData instead of showing an empty
  report
 Also called Domain Aggregate Functions
 Allows creation of summary information
  without a query
    DCount
    DSum
    DMax
 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”)
 Have to choose which event to respond to
 Events can be generated by the user or
  changes in data or objects
 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
 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
 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
 Most  objects are members of some group
 A collection is a group of like objects
    Forms collection holds all forms
    A form‟s controls collection holds all controls
     that belong to that form
 Branching    (what‟s next?)
    If-Then
    Select Case
 Loops   (repeating a task)
    For … Next
    For .. Each
    Do While
    Do Until
 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”
 Logic   errors
    Runs but doesn‟t give the right results
 Syntax   errors
    Compiler can‟t process your code
 Run-time    errors
    Problem happens during execution
    Use On Error to respond to
 ADO:   ActiveX Data Objects
    For working with data
    Not hierarchical
 ADOX:   ADO Extensions
    For working with database
    For security and database
 DAO:   Data Access Objects
    For working with data
    Used in Forms, Reports by Access
    Hierarchical (must know how each item fits in
     relation to others)
 Connection:  „pipe‟ for moving data
 Command: what data to work with
 Recordset: local copy of data from a table or
  query

Contenu connexe

Tendances (19)

Msaccess
MsaccessMsaccess
Msaccess
 
An advanced tool for searching the epo's worldwide patent data
An advanced tool for searching the epo's worldwide patent dataAn advanced tool for searching the epo's worldwide patent data
An advanced tool for searching the epo's worldwide patent data
 
Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0
 
ASP.NET 10 - Data Controls
ASP.NET 10 - Data ControlsASP.NET 10 - Data Controls
ASP.NET 10 - Data Controls
 
Data Clean-up: Is There A Better Way?
Data Clean-up: Is There A Better Way?Data Clean-up: Is There A Better Way?
Data Clean-up: Is There A Better Way?
 
Using Lucene for Search within XIS
Using Lucene for Search within XISUsing Lucene for Search within XIS
Using Lucene for Search within XIS
 
01 Microsoft Access
01 Microsoft Access01 Microsoft Access
01 Microsoft Access
 
SharePoint and Open XML
SharePoint and Open XMLSharePoint and Open XML
SharePoint and Open XML
 
Mail merge presentation
Mail merge presentationMail merge presentation
Mail merge presentation
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latex
 
Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)
 
Latex
LatexLatex
Latex
 
How to work a database
How to work a databaseHow to work a database
How to work a database
 
2. HTML forms
2. HTML forms2. HTML forms
2. HTML forms
 
WebAppGeneXpress_How_To_Presentation
WebAppGeneXpress_How_To_PresentationWebAppGeneXpress_How_To_Presentation
WebAppGeneXpress_How_To_Presentation
 
Mil.list
Mil.listMil.list
Mil.list
 
7 files
7 files7 files
7 files
 
Chapter.07
Chapter.07Chapter.07
Chapter.07
 
LaTeX Basics
LaTeX BasicsLaTeX Basics
LaTeX Basics
 

Similaire à Form Design and VBA Fundamentals

Similaire à Form Design and VBA Fundamentals (20)

Access 2 day course
Access 2 day courseAccess 2 day course
Access 2 day course
 
vishual basic data base Pankaj
vishual basic data base Pankajvishual basic data base Pankaj
vishual basic data base Pankaj
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
 
Access 2010
Access 2010Access 2010
Access 2010
 
Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
ALA Interoperability
ALA InteroperabilityALA Interoperability
ALA Interoperability
 
CIS266 Midterm Review
CIS266 Midterm ReviewCIS266 Midterm Review
CIS266 Midterm Review
 
Data Wrangling with Open Refine
Data Wrangling with Open RefineData Wrangling with Open Refine
Data Wrangling with Open Refine
 
Salesforce
SalesforceSalesforce
Salesforce
 
MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 
Access 2010
Access 2010Access 2010
Access 2010
 
21 domino mohan-1
21 domino mohan-121 domino mohan-1
21 domino mohan-1
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
 
Dbms fast track 2/3
Dbms fast track 2/3Dbms fast track 2/3
Dbms fast track 2/3
 
Spsbcn2018 joel rodrigues - pn p reusable controls and pnpjs
Spsbcn2018   joel rodrigues - pn p reusable controls and pnpjsSpsbcn2018   joel rodrigues - pn p reusable controls and pnpjs
Spsbcn2018 joel rodrigues - pn p reusable controls and pnpjs
 

Plus de Randy Riness @ South Puget Sound Community College

Plus de Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
Cis245 Midterm Review
Cis245 Midterm ReviewCis245 Midterm Review
Cis245 Midterm Review
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 
Document type definitions part 1
Document type definitions part 1Document type definitions part 1
Document type definitions part 1
 

Dernier

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Dernier (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

Form Design and VBA Fundamentals

  • 1.
  • 2.  Provide meaningful title  Organize fields logically  Use appealing form layout  Include familiar field labels  Be consistent with terminology and abbreviations
  • 3.  Allow for convenient cursor movement  Prevent and correct errors  Include explanatory messages for fields
  • 4.  Bound form has a Record Source  Displays data from fields in record source  Unbound forms  Do not have record source  Designed to help users navigate through database
  • 5.  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
  • 6.  Command buttons  Users click to perform common tasks  Can contain Text, Icons, Graphics  Create  Using Command Button Wizard  By adding button to form then setting properties  Beconsistent when creating command buttons  Location on form  Order
  • 7.  Formcreated 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!
  • 8.  Way to change query „on the fly‟  Can use prompt for user  Can get information from form controls  Forms!FormName!ControlName
  • 9.  List controls: set rowsource  Listbox  Combobox  Forms: set recordsource  Reports: set recordsource  Remember to requery!  Find right event to respond to
  • 10.  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
  • 11.  Limitednumber  Most deal with laying out and formatting data  Use NoData instead of showing an empty report
  • 12.  Also called Domain Aggregate Functions  Allows creation of summary information without a query  DCount  DSum  DMax
  • 13.  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”)
  • 14.  Have to choose which event to respond to  Events can be generated by the user or changes in data or objects
  • 15.  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
  • 16.  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
  • 17.  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
  • 18.  Most objects are members of some group  A collection is a group of like objects  Forms collection holds all forms  A form‟s controls collection holds all controls that belong to that form
  • 19.  Branching (what‟s next?)  If-Then  Select Case  Loops (repeating a task)  For … Next  For .. Each  Do While  Do Until
  • 20.  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”
  • 21.  Logic errors  Runs but doesn‟t give the right results  Syntax errors  Compiler can‟t process your code  Run-time errors  Problem happens during execution  Use On Error to respond to
  • 22.  ADO: ActiveX Data Objects  For working with data  Not hierarchical  ADOX: ADO Extensions  For working with database  For security and database  DAO: Data Access Objects  For working with data  Used in Forms, Reports by Access  Hierarchical (must know how each item fits in relation to others)
  • 23.  Connection: „pipe‟ for moving data  Command: what data to work with  Recordset: local copy of data from a table or query