SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot (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
 

Similar to Form Design and VBA Fundamentals

Similar to 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
 

More from Randy Riness @ South Puget Sound Community College

More from 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
 

Recently uploaded

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Recently uploaded (20)

YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 

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