MS-Access XP
E N D
Presentation Transcript
MS-Access XP Lesson 4
Modifying Queries • Select query in queries • Click design button or Right click on query and click design view • Change query fields, sorting order, show and criteria • Click save button in query design tool bar • Click run button in query design tool bar
Renaming Queries • Select query in queries • Edit menu, Rename menu item or right click on query and select rename menu item • Type new name to query Opening Queries • Select query in queries • Click open button database window • Or double click on selected query
Sorting a Table using Query • Select queries in objects • Double click on create query in design view • Select necessary table and click add button and finally click close button in show table dialog • Select fields to show • Select sorting order under the necessary field Ascending or Descending • Click save button in query design tool bar and type the name to query and click ok • Click run button in query design tool bar
Creating a Library Database • Tables • Category (Category No (Number), Category Name (Text), Description (Memo)) • Book (Book No (Number), Book Name (Text), Author (Text), Category No) • Member (Member No (Number), Name (text), Address (Text), Telephone (Number), Gender (Text)) • Borrowing (Member No, Book No, Lending Date (Date), Due Date (Date)) One category has many books. But one book has only one category.
Multiple Table in Queries • Creating a query to display all books with book category in library database • Select queries in objects • Double click on create query in design view • Add Category and Book tables • Select Book No, Book Name, Author and Category fields to show • Click save button in query design tool bar and type the name to query and click ok • Click run button in query design tool bar
Multiple Table in Queries • Creating a query to display all authors with book category in library database • Select queries in objects • Double click on create query in design view • Add Category and Book tables • Select Category No, Category, Description and Author fields to show • Click save button in query design tool bar and type the name to query and click ok • Click run button in query design tool bar
Forms • You can use forms for a variety of purposes. Most of information in a form comes from an underlying record source. Other information in the form is stored in the form design. You create the link between a form and its record source by using graphical objects called controls. • You can create a form on your own or MS-Access create your form for you using form wizard.
Creating a Form • Select forms in objects • Double click create form by using wizard • Select table or query • Select fields and click next • Select form layout and click next • Select form style and click next • Select form title • select open form to view or enter information to entering data or modify the form design to modifying the form • Click finish button
Navigation Buttons 1st Record Previous Record Next Record Last Record Add new record
Modifying a Form • Select form • Click design button in database window or right click on form and select design view • View menu, Tool box menu item • Add necessary tool box controls to form header, detail and form footer • Click save button in form design tool bar
Removing Navigation Buttons • Select design view of a form • Select view menu • Select properties menu item • Select form in list and format tab sheet • Select No to Navigation Button property