Designing Complex Forms

download Designing Complex Forms

of 18

  • date post

    01-Jan-2016
  • Category

    Documents

  • view

    32
  • download

    0

Embed Size (px)

description

Tutorial 4. Designing Complex Forms. Building the User Interface for the MovieCam Technologies Database. Introduction to Forms. Distinction between bound and unbound forms an unbound form is not tied to any table or query. - PowerPoint PPT Presentation

Transcript of Designing Complex Forms

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Tutorial 4Designing Complex FormsBuilding the User Interface for the MovieCam Technologies Database

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Introduction to FormsDistinction between bound and unbound formsan unbound form is not tied to any table or query.This form is used as an interface to the other database objects.The buttons on the form, when pressed, perform some action but do not work in conjunction with table data.The unbound form example on page 142 is called a switchboard because its purpose is to open other database objects such as forms and reports.

    bound forms.The bound form is associated with an underlying table. When data is entered into the bound form, the data in the table is manipulated accordingly.

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Unbound Form Example

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Bound Form ExampleToolbox in Access

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Form DesignForms are the users view of the database.It is very common to provide an interface in which the user never actually sees the Access environment at all. (Unbound form)important that the interface is attractively laid out, easy to navigate, and requires the least amount of learning curve. The more the interface looks like Windows-based application, the easier it will be for the user to learn.User Interface - mechanism by which the user communicates and interacts with the application. From the users perspective, the user interface is the application.ScreenTip - A message that appears when the pointer is positioned on a control on a form or on a button on a toolbarSplash Screen - A form that opens automatically when a database is opened, and is designed to give the user something to view while the application is loading

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Form Design guidelines goalsLook and feel like Windows (Office)Input text boxes white background, sunken special effectOutput text boxes flat effect same background color as formSimple is better avoid too many colors and fonts (group information)Be direct linear, intuitive ways to accomplish tasksOrganize controls logically, keystroke shortcuts on command buttons and menusProvide feedback ScreenTip messagesScreenTip is a message that appears when pointer is over a control on a form or toolbar button (short and informative)

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Classroom Activitygo through Form Design consider each of the goals. may not have thought about the interface accustomed to using in Windows-based applications. Open one of the common dialog boxes in an applicationPrint dialogue box in Word, Excel, or PowerPoint. review this dialogue box and discuss why the developers made their decisions as to what kind of control should be used for each option in the dialog box. formulate suggestions of how the dialogue might be better designed for even greater User-friendliness. Be sure they consider things like color, layout, and choice of controls.

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Print Dialog Box

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Classroom ActivityThe first topic in the Form Design section is related to the look and feel of Windows. do a comparison of two different Window-based applications. For example, open Word and Excel. write down common elements are in the two interfaces. list different elements in the two interfaces(for example in Excel there is a merge and center button but not in Word). consider the advantages of having the common elements in the two applications. point out underlying code for printing appears to be the same for Word and Excel.same code can be used for two different applications. database developers re-use code between different database applications

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Form Template vs. Form Masterform template - establish default property setting, form size, and form sections (i.e., the basic structure for all forms in the database). if form template not created, all new forms are based on the Normal form template.works exactly the same way as a Word templateThe form template does not have any controls in it.form master - specify controls common to all forms in the database.New forms take on the characteristics of the Form Template but NOT the form master. form master must be copied and pasted to new forms. So all new forms will be based on the form template and then, where it is desired, the form master will be copied to the new form.think through design of a database BEFORE beginning.If wait until all the forms created, these techniques are immaterial because forms already completed want common elements to be applied to the existing forms, much more work will be involved then if had created the template and master ahead of time.

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Quick Quiz_____ forms are forms that are tied to a table or query.(Answer: Bound)A switchboard is NOT an example of an unbound form. (Answer: False)A form _____ is a form on which you base other forms you create in a database. MasterText boxTemplateScreen

    (Answer: C)

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Creating Data Entry FormsfrmDegrees college degrees data (created)frmDepartments company departments data (new)frmEmployees data on employees (created & modified)frmJobs used to review hours spent to date on existing jobs (created)Contains a read-only subform (time card data)frmJobTitles job titles data (created)frmTimeCards data on labor and projects (incomplete)Central form in database, used to enter data into tblTimeCards and tblHours tables

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Identifier OperatorsIdentifier Operators - Operators that are used in expressions, macros, and VBA code to identify objects and their propertiesBang Operator (!) - An operator that is used to separate one object from another or from the object collection.Collection - An object that contains a set of related objects(Forms collection all open forms in database)Dot Operator - An operator that is used to separate an object from its property or methodZero-Based - An object which begins its counting with the number 0.

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Identifier Operators (example code)Forms![Orders]![OrderDate].DefaultValueThis identifier refers to the value of the DefaultValue property of the OrderDate control on the Orders formForms![Orders]![OrderID]The OrderID control on the open Orders formReports![Invoice]![WarehouseName].VisibleThe Visible property of the WarehouseName control on the Invoice reportIn short, the exclamation point separates elements of a collection and the period indicates that what follows is an Access-defined property or method.

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Quick Quiz_____ are used in expressions, macros, and VBA code to identify objects and their properties.(Answer: Identifier Operators)The _____ operator is used to separate one object from another or from the object collection.(Answer: Bang or !)The column property of a combo box return the value contained in a particular column of the combo box. It is said to be _____. Row majorColumn majorZero-basedSingle-based(Answer: C)

    New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

  • Tutorial 4New Perspectives on Microsoft Access 2003 with Visual Basic for Applications

    Creating SwitchboardsSwitchboard - An unbound form that is used to navigate to other forms, queries and reports in the database.should be planned out way in advance of actually creating them in Access. The database developer should sit down, away from the computer, and determine what forms, queries, and reports will need to be opened by the user. The developer will want to consider the most logical arrangement of the switchboard controls and wh