Professional Documents
Culture Documents
DATE
: :
Microsoft Access
To make Table, Queries, Forms & Reports
T a ble s
When you create a database you store your data in tables subject-based lists of rows and columns. Columns are also called fields, which are the information items you want to track. You define a table in terms of the fields you want to track for that subject.
In Open dialog box, select and open the database. In the Navigation Pane, double-click one of the available tables to open it. Type your data in the cell below the Add New Field column header.
In Open dialog box, select and open the database. On the Create tab, in the Tables group, click Table.
Access inserts a new table in the database and opens it in Datasheet view. 4. Type your data in the cell below the Add New Field column header.
When you enter data in the new column, Office Access 2007 uses the information you type to recognize the appropriate data type for the field. For example, if you type a date in the column, such as 1/1/2006, Office Access 2007 sees the information you entered, recognizes it as a date, and sets the data type for the field to Date/Time. If Access doesn't have enough information from what you enter to guess the data type, the data type is set to Text.
Q ue r ie s
Queries are useful for working with just those fields from a table that pertain to the task at hand. When you want to further restrict the data that you work with, based on the value contained in a field, you can use criteria in your query. Criteria are rules that you include in the design of a query these rules specify values or patterns that you want the fields to match or contain to be returned by the query. When you want a query to prompt you for a value or pattern every time you run it, you can create a parameter query. You can also use parameters with a report to prompt you for criteria when you run the report. You can use forms to enhance the collection and passing of query and report parameters in the following ways: By allowing you to use data-type-specific controls By enabling the persistence of parameter values By allowing the use of combo box controls (so you can pick a value from a list, rather than typing it) By allowing you to use other controls that are available in forms
1. 2.
On the Message Bar, click Options. In the Microsoft Office Security Options dialog box, click Enable this content, and then click OK.
If you already have a select query that produces the data that you need, go to the next steps.
1.
2.
In the Show Table dialog box, double-click the tables from which you want to retrieve data. Each table appears as a window in the upper section of the query designer. Click Close when have finished adding the tables. In each table, double-click the field or fields that you want to use in your query. Each field appears in a blank cell in the Field row of the design grid. This figure shows the design grid with several table fields added.
3.
4. 5. 6. Optionally, add any expressions to the Field row. Optionally, add any criteria to the Criteria row of the design grid.
7. 8.
Click Run
Optionally, change your fields, expressions, or criteria and rerun the query until it returns the data that you want to place in your new table.
2.
If you have the query open in a datasheet, right-click the document tab for your query and click Design View. If the query is closed, in the Navigation Pane, right-click the query and click Design View on the shortcut menu. On the Design tab, in the Query Type group, click Make Table. The Make Table dialog box appears.
3.
In the Table Name box, enter a name for the new table. -orClick the down-arrow and select an existing table name.
4.
Place the new table in the current database 1. 2. If it isn't already selected, click Current Database, and then click OK. Click Run , and then click Yes to confirm the operation.
NOTE If you are replacing an existing table, Access first deletes that table and asks you to confirm the deletion. Click Yes, and then click Yes again to create the new table.
Place the new table in another database 1. 2. Click Another Database. In the File Name box, enter the location and file name of the other database. -orClick Browse, use the new Make Table dialog box to locate the other database, and click OK. 3. 4. Click OK to close the first Make Table dialog box. Click Run , and then click Yes to confirm the operation.
NOTE If you replace an existing table, Access first deletes that table and asks you to confirm the deletion. Click Yes, and then click Yes again to create the new table.
F o rm
A form is a database object that you can use to enter, edit, or display data from a table or a query. You can use forms to control access to data, such as which fields or rows of data are displayed. For example, certain users might need to see only several fields in a table with many fields. Providing those users with a form that contains just those fields makes it easier for them to use the database. You can also add buttons and other functionality to a form to automate frequently performed actions. Think of forms as windows through which people see and reach your database. An effective form speeds the use of your database, because people don't have to search for what they need. A visually attractive form makes working with the database more pleasant and more efficient, and it can also help prevent incorrect data from being entered. Microsoft Office Access 2007 gives you new tools to help you create forms quickly, and provides new form types and features that improve the usability of your database.
Access creates the form and displays it in Layout view. In Layout view, you can make design changes to the form while it is displaying data. For example, you can adjust the size of the text boxes to fit the data, if necessary. For more information about form views, see the Understand Layout view and Design view section. If Access finds a single table that has a one-to-many relationship with the table or query that you used to create the form, Access adds a datasheet to the form that is based on the related table or query. For example, if you create a simple form that is based on the Employees table, and there is a one-to-many relationship defined between the Employees table and Orders table, the datasheet displays all the records in the Orders table that pertain to the current Employee record. You can delete the datasheet from the form if you decide you do not need it. If there is more than one table with a one-to-many relationship to the table that you used to create the form, Access does not add any datasheets to the form.
1. 2.
On the Create tab, in the Forms group, click More Forms, and then click Form Wizard. Follow the directions on the pages of the Form Wizard.
NOTE If you want to include fields from multiple tables and queries on your form, do not click Next or Finish after you select the fields from the first table or query on the first page of the Form Wizard. Instead, repeat the steps to select a table or query, and click any additional fields that you want to include on the form. Then click Next or Finish to continue.
3.
R e po r t
A report consists of information that is pulled from tables or queries, as well as information that is stored with the report design, such as labels, headings, and graphics. The tables or queries that provide the underlying data are also known as the report's record source. If the fields that you want to include all exist in a single table, use that table as the record source. If the fields are contained in more than one table, you need to use one or more queries as the record source. Those queries may already exist in your database, or you may need to create new queries specifically to fit the needs of your report.
After viewing the report, you can save it and then close both the report and the underlying table or query that you used as a record source. The next time that you open the report, Access will display the most recent data from your record source.
Table
Form
Contact
Sr. No First Name
1 Pankaj 2 Pankaj 3 Palak 4 Nishu 5 Parshant 6 Sandeep 7 Swati 8 Pooja 9 Shivani 10 Radhika
Last Name
Gill Singh Gupta Ahlawat Singla Rawat Talwar Badhal Garg Singhal
E-Mail
pankajsinghgill@gmail.com pankajsinghgill@hotmail.com palak_gupta@gmail.com nishu_2012@gmail.com parshant_inbos2011@hotmail.com sandy_in@yahoo.com talwar.swati@gmail.com puja_123678@gmail.com shivi_me@rediff.com radhika.me@live.in
Page 1 of 1