• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 10. Using Forms > Uses of Forms

Uses of Forms

Forms are the primary interface between users and your Microsoft Access application. You can design forms for many different purposes.

  • Displaying and editing data This is the most common use of forms. Forms provide a way to customize the presentation of the data in your database. You can also use forms to change or delete data in your database or add data to it. You can set options in a form to make all or part of your data read-only, to fill in related information from other tables automatically, to calculate the values to be displayed, or to show or hide data on the basis of either the values of other data in the record or the options selected by the user of the form.

  • Controlling application flow You can design forms that work with macros or with Microsoft Visual Basic procedures to automate the display of certain data or the sequence of certain actions. You can create special controls on your form, called command buttons, that run a macro or a Visual Basic procedure when you click them. With macros and Visual Basic procedures, you can open other forms, run queries, restrict the data that is displayed, execute a menu command, set values in records and forms, display menus, print reports, and perform a host of other actions. You can also design a form so that macros or Visual Basic procedures run when specific events occur—for example, when someone opens the form, tabs to a specific control, clicks an option on the form, or changes data in the form. See Part 5, “Automating an Access Application,” for details about using macros and Visual Basic with forms to automate your application.

  • Accepting input. You can design forms that are used only for entering new data in your database or for providing data values to help automate your application.

  • Displaying messages Forms can provide information about how to use your application or about upcoming actions. Access also provides a MsgBox macro action and a MsgBox Visual Basic function that you can use to display information, warnings, or error messages. See Chapter 23, “Automating Your Application with Visual Basic,” for more detail.

  • Printing information Although you should design and use reports to print most information, you can also print the information displayed in a form. Because you can specify one set of options when Access displays a form and another set of options when Access prints a form, a form can serve a dual role. For example, you might design a form with two sets of display headers and footers, one set for entering an order and another set for printing a customer invoice from the order.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint