Notes of MS Access

These Notes specially design for DIT

What is an Electronic Database?

Database is a collection of related information which  arranged in a systematic way that its reduced the redundancy and shareable by more then one person at the same time  for different purpose . Databases constructed on computers is called electronic Database. we can also say that  computer-based collection or listing of information, usually organized with searchable elements or fields is called Electronic database. For example  library database which consists of records describing articles in journals or newspapers  and the searching of these information easy and fast.

Why use electronic databases?

There are many reasons that we use the electronic database some of these reasons given below:

In Electronic Database we can  can be searched through a query in few seconds on many millions of records. If we do this  manually then its take allot of time.  The electronic database have flexibility. So that we can develop different data model.

electronic Database remove the redundancy so the data in electronic database is consistent. So data will never mismatch. The oldest database with billions of records, as long as it has been properly designed and maintained, it will still search rapid and return result fast versus manual where each growing record slows down end point of search drastically. electronic data base is shareable so we access the record which we need very quickly from any ware with the help of networking or through the internet. In electronic database There is no limit that how many user and how many time  database is searched.

 What is Microsoft Access

Microsoft Access is DBMS system (database management system). MS office also called Microsoft office combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. MS Access is one of the  member application of the Microsoft Office suite. in MS Access we can create table , queries, forms , module and  macro with some clicks.

Components of Ms Access user interface

Some of the  major components of MS Office 2007 interface are:

Title Bar

The title bar contains the name of the program. On the extreme right are the buttons to minimize, maximize/restore and close.

Menu Tab

Below the title bar is menu tab is located ( Commands Tab). we can select any menu item from this bar.

The Office  Ribbon

This panel is located at the top of the program window. The office ribbon contain following item:

    Command Tab

    This is also called menu tab. This tab contain some option. when we select any option  then related command are display below this tab.

    Contextual command Tab

    This tab is below the Command Tab. When we click on any option from Command tab then related commands  depending on your context  are  appears in this tab.

    Quick Access Toolbar

     The small tool bar that appears on the Ribbon on left side and offers single-click access to most needed commands, such as Save and Undo and Redo. You cal also some more command which you commonly use by customizing this tool bar.

Navigation Pane

The area on the left side of the working window that displays your database objects. The Navigation Pane replaces the Database window from earlier versions of Access.

Status bar

In the bottom of working window a bar  is called status bar which displays status information and includes buttons that allow you to change your view.

Mini toolbar

When you select the text and move the mouse on above text  a menu appear transparently  above that text that you have selected,  and from this menu you can  easily apply the formatting option to the text.

Office Button

Office button is located in the upper-left corner of the  Microsoft Office 2007 Program window. Office button contain those  Options command that was on the Tools menu in previous version like that Save , open Print etc.

What is Table In Access?

in ms access Tables is collection of row and column like a grid  which contain the actual records. The following are the different components of Access Table.

Rno Marks Result Remarks
101 500 Pass Good
102 800 Pass Very Good

1.Name of The Table

Every tbale have a unique name. The name of table define by user when you save the table in MS Access. For example tbl_main. so we also define table name as main but including a prefix tbl_  its  make different and knowable from other object like that queries and forms etc.

2.Columns:

Vertical section of the table is called column. the number of column depend on the number of the fields which you want to store as your record. For example in above table we define four fields Rno, Marks, Result, Remarks then the table have four column.

3.Rows:

The horizontal segment of the table is called Rows. One row consist on one record.For example In the above table  101, 500, Pass, Good is one record. The record always entered  left-to-right .

4.Cells:

The combination of a row and a column is called Cell. For example in above table intersection of First row and first Column is Rno this is first cell of the table.

 Association Between Data Items

An association is logical relationship between data items. An association implies that the values for the associated data item are in same way depending on each other.

There are following four types of association:

1.            One To One Association

2.            One To Many Associations

3.            Many To Many Associations

 

1) One To One Association:

A One To One association between data item X and Y means that for specified period of time a given value of X have one and only one value for Y. this association is represented as follow. 

Suppose we have two data item Reg #  and student name then there is one to one association between Reg # and student name because for specified period of time one registration number is assigned to one student.

 2) One To Many Associations

A One To many association between data item X and Y means that for specified period of time a given value of X have one or more then one value for Y. this association is represented as follow.

 

  

Suppose we have two data item Teacher   and Subject then there is one to many association between Teacher and Subject because for specified period of time one teacher may be teach more the one subject.

 Many To Many Association:

A Many To Many association between data item X and Y means that for specified period of time a given value of X have more then one value for Y and Y have also more then one value for X. This association is represented as follow.

 

The most useful example of this association is relation between Student # and course #. Any student may have taken one or more then one course at a time and any course may have taken by one or more then one students.

 

What is Attribute, Tuples, Field , Record and  Files

Attribute:

A single data item related to a database object. The database schema associates one or more attributes with each database entity. Attribute is also known as: field, column.

Record:

Collection of different fields  is called record. for example in above table 101, 500, pass is one record. we can also say in database table single record show the one record.

Tuples:

A row in table is called tuple , is also called Record.

File:

The collection of all database object for example  Tables , Queries, Forms , Report and Access is called File. In access this file is store with .MDB extension and called  MDB file.

Concept of Key In Relational Database

A key is single attribute that is used to identify one or more item form database. In simple word we say that data item which is used to identify the record is called key. The data elements, which cause other element to be known, is called key.

For example

Rno                       name               City

001                        Toqeer             DIKHAN

002                        Abrar               DIKHAN

003                        Ali                    DIKHAN

In above table RNO is a data element by which we can identify the record so it is called key.

 

TYPES OF KEY

 

1. Primary Key

A data item or attribute that uniquely identify every tuple (row or record) in relation is called primary key or attribute key. It is used to access the data from database. It is also called atomic key (It is probably meant to identify something "as small as possible"). A table must have unique key so that no duplication occurs. Primary key always unique and not assign NULL value.

For example

                              Reg#               Name                 City

In above relation Reg # is primary key because as no more then one student have same Reg # so we can access single row with the help of Reg#. In simple word if we give Reg # of the student then we can access the whole record of that student.

 

3. Compound Key

In database design, a compound key is a key that consists of 2 or more attributes that uniquely identify an entity occurrence. Each attribute that makes up the compound key is a simple key in its own right.

4. Composite Key

Composite key is also a key that consists of 2 or more attributes that uniquely identify an entity occurrence; at least one attribute that makes up the composite key is not a simple key in its own right.

 5. Super Key

A super key is a set of columns within a table whose values can be used to uniquely identify a row. A candidate key is a minimal set of columns necessary to identify a row, this is also called a minimal super key. For example, given an employee table, consisting of the columns employeeID, name, job, and departmentID, we could use the employeeID in combination with any or all other columns of this table to uniquely identify a row in the table. Examples of superkeys in this table would be {employeeID, Name}, {employeeID, Name, job}, and {employeeID, Name, job, departmentID}.

In a real database we don't need values for all of those columns to identify a row. We only need, per our example, the set {employeeID}. This is a minimal superkey ? that is, a minimal set of columns that can be used to identify a single row. So, employeeID is a candidate key

 6. Candidate key

When more then one attribute can access the uniquely record from a table then one attribute chosen as primary key then other attribute is candidate key.

 7. Foreign Key

An attribute which is primary key in one relation and non primary key in other relation then it is called foreign key.

For example if we have two relation

 

                              Student(Rno#, Name, Marks)

                              Book(Rno#, Book#, Bname)

In student record Rno# is used as primary key and in book record of library one Rno# can take more then one books so in this relation we can not used Rno# as primary key. So in this relation Book# is used as primary key. So Rno# in Book relation is used as Foreign Key. 

What is a wildcard ?

A wildcard is a symbol that takes the place of an unknown character or set of characters. Commonly used wildcards are the asterisk ( * ) and the question mark ( ? ).

When you are searching a record in access quires, you can simplify your search by using a wildcard.

First of all, wildcard characters can be categorized as follows:

 1) 'String' Group

* (asterik)

 2) 'Character' Group

? (question), # (pound), [ ] (bracket), ! (exclamation)

 3) 'Range' Group

[ ] (bracket), - (hyphen), ! (exclamation)

 

? (Question)

This is a single character reference. It can be used as a substitute for any character (letters, numbers, special characters). Here are a couple of examples

(Input Criteria = Output Result being queried):

Code:

1) I Love MS A?cess = I Love MS Access

2) I Love MS A??e?? = I Love MS Access

# (pound)

This is also a single reference substitute. However, it is limited to numeric values only. Numeric values include any number, even if it has been declared as a non-numeric data type (such as text, or date. Here are some examples:

Code:

1) 1/##/2007 = 1/12/2007 or 1/20/2007 or 1/31/2007, etc...

[ ] (bracket)

This is very useful, especially when you need to extract specific data. It can be used to help retrieve specific characters within larger strings. You can use it to find one character, multiple characters, or even a range. The only bad thing about the bracket is the limitation. It can only be used to query one space at a time. The other thing to remember here is when you're using it to find multiple numeric values. If you have more than one numeric in the bracket, they must be delimited somehow (if they're not, they will be evaluated as one long numeric string). Commas, colons and semicolons all work fine for this purpose. Here are some examples of the bracketing method:

Code:

1) SQL is tou[g]h to learn = SQL is tough to learn

2) SQL is t[w, o, n, m]ugh to learn = SQL is tough to learn

- (hyphen)

This is very simple. It just specifies a range of values within a bracket. Examples:

Code:

1) This is si[k-p]ple = This is simple

2) This is si[g-p][g-p]le = This is simple or This is single

3) F[a-p]ll = Fall or Fell or Fill

 

! (exclamation)

Also called the "bang" symbol, this functions in a way similar to the not keyword. The only difference between the two is the context in which they are used. The bang operator is used with brackets:

Code:

1) [!3-7]st example = 1st example

2) F[!a-e]ll = Fill or Full

* (asterik)

This is probably the most confusing to work with. The part that is commonly misconstrued is the concatenation of the character with other strings (using the ampersand ("&")).

I use what I call the "connector" rule to determine weather or not my criteria will give me the result I want. Here is the basic principal:

If the * is connected to a string, it applies only to one non space-delimited string. If it is not connected to a string, it applies to the entire field value, relative to its placement within the criteria section as a whole. Here are some examples to illustrate:

Code:

1) Mic*oft = Microsoft

2) Micro* = Microsoft

Data Types in MS Access 2007

In Access when you declare a field then you must define the data type of that field. In Access you can define the following data type:

The different kinds of Access data are:

Text: This type allows you for the storage of any kind of data, characters, digits and special characters. The length of  text is 50 characters with a maximum length of 255. It is normally used to store data such as names, addresses, or any number.

 Memo: when you text length is  more than 255 characters then you can use memo data type. It has a maximum length is 65536 characters.

Number: This type is use for storing the number data.  The type of the Number data can be  Byte, Integer and Long Integer which store the numbers without decimals and the types Single, Double and Decimal allow to store number contain decimals point.

 Date/Time: This data type specially used to store the Date and time.

 Currency: The accuracy data type is up to 15 digits to the left of the decimal separator and up to 4 digits to the right of the same.

Auto number: This is a unique sequential number which automatically increase one by one . when we add new record then the filed which contain auto number data type automatically assign the value by one added to previous value.

 Yes/No: Yes and No values, store the data in shape of True or false / Yes or No / Activated  / Deactivated.

 OLE Object: an object such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, images, sounds, or other binaries.

 Hyperlink: text or a combination of text and numbers stored as text and used as a hyperlink address. A Hyperlink is a text or graphic that you click to go to a file, a location in a file, a web page on the Internet, or a web page on an intranet.

How to Create a New Database in MS Access

in Access 2007 we can create new database in two way :

  • Create a new Database from  template.

  • Create a new Blank Database.

How to create New Database with Templates

In MS access there is  a wide variety of templates that you can use to create your database . This very easy process and you can save your time.  A template is a Pre design database in which every thing already define like that tables, queries, forms, and reports which are needed to perform a specific task.  Some templates contain a few sample records to help demonstrate their use. You can also  customize these templates as you need.

Creating Process: 

Open MS Access Application. or  if you already open then Click the Microsoft Office Button and Click on New.

Chose Type of database

Type file name to save it.

Click on create button.

Create a Blank Database

If you want to create Blank database and want to define every thing your self then don't use template. The following procedure is used to create a new blank database:

Open MS Access Application. or  if you already open then Click the Microsoft Office Button and Click New.

 Click the New Blank Database icon.

 Type the name for the database which you want.

Click Create button.

 

Create A New Table in Access 2007

in MS Access you create a new table in Three ways  below we disuse each of thes in detail:

Creating a table in Design

Creating a table in  Datasheet View

Creating a Table Through Table Templates

Creating a Table in Design

Create A new database or open an existing database in MS excel 2007

  • Click on CREATE Tab on the Access ribbon.

  • Select Table Design Option from Tables Group of office Ribbon.

  • In next appearing screen Add Field Name and Select its Data type and add the description if you want other wise leave description. For example Rno as filed name and Number as Data type.

  • Set The Some properties of each field form Field Properties Windows Section by clicking on General tab. For example Field Size Field format, default value etc. You can also set a Primary key from one filed. 

  • Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.

  • Give a name to your table and Click Ok Button.

Create Table In Datasheet View

The process of Creating a new table in datasheet view is given below:

  • Create A new database or open an existing database in MS excel 2007

  • click on CREATE Tab on the Access ribbon.

  • Select Table from Tables Group of office Ribbon.

  • Datasheet view will be open .The new table opens automatically in Datasheet view. You  can  add  your fields by  double-click the first field header and enter the Name for the field. When you finish, press ENTER.

  • Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.

  • Give a name to your table and Click Ok Button.

Create Table Through Table Templates

In MS Access you can also create a new table Through Table Templates.  Datasheet view which provides a visual way to create a new table. A Table template are Pre design Tables in  which Fields and properties are already set you just select category of table.

  • Create A new database or open an existing database in MS excel 2007

  • click on CREATE Tab on the Access ribbon.

  • Click  Little arrow on Table Templates from Tables Group of office Ribbon.

  • Select The Category.

  • The New table is Created .

  • Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.

  • Give a name to your table and Click Ok Button.

Adding The data in Table

The following process is used to enter the data in Table:

  • Double Click on Table Name form Navigation Pane.
  • The Table Window will be open..
  • Now enter the value of filed. row by row.
  • After entering the record just close the table.

Creating Relationship in MS Access

The Process of creating new relation ship between table is as fellow:

  • Click on  Database Tools Tab on the Access ribbon. Then click the Relationships button.

  • The Show Tables dialog box will appear.

  • Now add the relational tables by selecting table name which you want to add and click on add button.  You can also select multiple tables by Pressing Control and select each table one by one and then click on add button.

  • Now Create relation ship between tables .First, you will need to identify the primary key and the foreign key in the relationship.

  • Once you identified them, click on the primary key and drag it to the foreign key. You will then see the Edit Relationships dialog and select the relation type etc.

  • Once you will finish, click the Create button to close the Edit Relationships dialog.

What is Queries and Types of Queries

In Access where table holed the record and Query is command which is use to access and manipulate the record form one or more then one table. The query is most essential component of a database.  you can apply filter With a query , so that its restrict the user that he  only get the information which  you want.

This is the most common type of query.

Select Query

The select query is used to display the record form one  or more then one  table. When we execute Select query then its gets the record form physical database table and put in logical table in which you can also make change. You can also define criteria that tells the database which record you want to select. 

Action Query

The query in which we perform some operation on table like that delete, update, insert data, and to create a new table from one existing table  is called  action query. Action queries are very important  in data management because you can change more then one record at a time.

Four kinds of action queries are:

Append Query    : Its add the result in existing table.
Delete Query    : Its delete the records.
Create Table Query    : its creates a new table based on the set results of a query.
Update Query    : Its allows for one or more field in your table to be updated.

Aggregate Query

This type of query is used when we perform some function like that  sum the records , get the max record from table. Aggregate query work on other queries such as selection or  action. Some of  SQL aggregate functions available to Microsoft Access are Sum ,Avg, Min, Max, First etc

Cross Tab Query

The cross tab query is struck in form of matrix. in cross tab query the column heading are create form some table values. It usually involves aggregation of data means that Cross tab queries summarize the values of physical table and then group them by two sets of facts Row and Column.

Creating  Query In Access 2007

In Access 2007 we have Two ways to create a Query.

  • Creating Query using the Query Wizard

  • Creating Query In Design View

Creating Queries using the Query Wizard In Access 2007

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the Queries Wizard icon Form Other group.
  • In appearing dialog box select Simple Query Wizard.
  • In Next appearing dialog box select the table from which you want to build query.
  • Click a field name in the Available Fields list, then click the Add (>) button to move the field name to the Selected Fields list. You can also  Add  all field by clicking  Add All (>>) button.
  • In Next dialog box Give the Title of your query and  click Finish to view the query results. you cal also check the Modify Query In Design View for Some modification.

 Creating Queries In design View In Access 2007

The following process is used to create query in Design view:

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the Queries Design icon Form Other group.
  • In Next screen Query Design view window with a dialog box appear.
  • This dialog box  show the table name select the table from which you want to create query. You cal also add more the one relational table. After adding the table name close this dialog box.
  • Now you can see the added table in Query Design view window. From  top pane of the Query Design view double click on the Field  which you want to use in query. you can also click In the first field column of the query grid, click in the Field box. A drop-down arrow list then appears.  Click the drop-down list and select a field.
  • You can also set criteria for a query that can control how field information in selected fields appears in result.

In the Query Design view, click the Criteria row in the desired field's column and type the criteria you want to use. For example if you have a column Name and have a value Saleem  then you can add criteria as

=Slaeem

So the in the result the only those record selected where name is equal to saleem.

Creating Cross Tab Queries In Access 2007

The following process is used to create query in Design view:

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the Queries Wizard icon Form Other group.
  • Select The Query Type As Cross Tab Query Wizard.
  • The Cross tab query dialog box appear on screen.
  • First screen Select The Table name from which you want to create query.
  • In Next Screen Select the Row heading.
  • Next Select The column heading.
  • Now Select which column you want to calculate the values and select the function for example Sum.
  • Give the Name and Click On finish Button.

JOINING

When data from more than one table in the database is required, a join condition is used. Rows in a table can be joined to rows, in another table according to common values existing in the corresponding columns, i.e., usually the primary and foreign key columns.

A join is nothing more than writing a query that takes a set of rows from one or more tables and combines them together.

Types of Join

Inner Joining

If you want to show only those rows that have matching values in the joined field, you use an inner join. Access creates inner joins automatically.

Inner joins are the most common type of join. They tell a query that rows from one of the joined tables correspond to rows in the other table, on the basis of the data in the joined fields. When a query with an inner join is run, only those rows where a common value exists in both of the joined tables will be included in the query operations.

Outer Joining

Outer joins tell a query that although some of the rows on both sides of the join correspond exactly, the query should include all of the rows from one table, and also those rows from the other table that share a common value on both sides of the join.

Full Outer Joining

When you want to show all rows from two tables and join them based on common values, you use a full outer join.

Cross joins

Cross joins are different from inner and outer joins in that they are not explicitly represented in Office Access 2007. In a cross join, each row from one table is combined with each row from another table, resulting in what is called a cross product or a Cartesian product. Any time you run a query that has tables that are not explicitly joined, a cross product is the result. Cross joins are usually unintentional, but there are cases where they can be useful.

Difference between Relationships and joins

There are tow terminology are used in database one is Relationships and other is joins. These two Relationships and joins are not same . A relationship is a set of rules that enforces referential integrity. How you can add and delete data. For example, if you delete a supplier, referential integrity controls whether Access removes the products related to that supplier.

In contrast, a join describes how your data must match in order to be included in a record set. For example, one type of joins returns data from a source only when it finds matching records in another, and we'll show you what that means in the next section.

You only use joins in queries, and Access lets you use joins in ways that you can't use relationships. For example, you can delete joins without harming your database, but deleting a relationship will break part or all of that database. What's more, you can add joins where no table relationships exist. For example, you can join a table with a query, provided each has a field with a compatible data type.

What is a form and How we Create a new Form

Form is any easy way to enter, view, update and delete the data from database. You can Easily create the Entry Form using different tools in access 2007. in MS access there are number of  way to create a form in Access 2007.

Creating Form through Wizard

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the More Form icon and click on dropdown list and select drop  down list of form types appears. You need to select Form Wizard from this list.
  • Select table name and fields in appearing dialog box.
  • Click on field name and click on add > button. you can add all filed by clicking add all >> button
  • in next dialog box select a Layout of form. click  on any layout for example Columnar, Tabular. if you are going to deal with single record one time then select columnar else tabular or data sheet which you want and click NEXT button.
  • The next coming dialog box select a style that from the list box. click  on any style which you want and click NEXT button.
  • Write The Name of the form and click on finish button. you can also check the Modify Form check box for modifying the form for example Inserting Button and other object in the form.

Creating Form In Design View

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the  Form Deign from this list.
  • This will open a blank form in Design View.
  • Click On the Design Tab from ribbon and Click on Property Sheet.
  • The  Property Sheet panel appear on right side of design window.
  • In the Property Sheet window select the Form from Selection Type List and click On Data Tab and select the Record Source dropdown list, select the table that contains the fields you want to include in your form.
  • After selecting a table, click on the Add Existing Fields button on the Access ribbon.
  • Now, in the right panel, you will see a list of all available fields from the Table you chose in previous Step.
  • Double Click on each field which you want to insert in the form.
  • For viewing the form click on the View button on the Access ribbon and select Form View.
  • click on view button agin To return to your form design.
  • when finish click the Save icon in the Quick Access Toolbar.
  • Enter a name for the form and Click OK button.

How We create Navigation Buttons

If you have create a form for view purpose then you must add some navigation button on your form To move to the next record or previous record etc.

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for button with the help of mouse by dragging the border down or right side.
  • Now Click on Design Tab form Office Ribbon then Select the Button icon Form The control group.
  • Now Create a new button by dragging the mouse on Free Space of Form .
  • When you finish then a dialog box appear from which you select Record Navigation from Categories list box and Then select Go To next record from Action list box.
  • Now define The caption of Your Button you can write text or select the icon image for your button.
  • Give the name of your button and click on Finish button.
  • Repeat the above steps and create more navigation button for example Go Previous Record, Go To First Record , Go To Last Record.

 

Creating a Button for Adding and deleting New Record

If you have create a form for entry purpose the first create a button form which you can add the record in database table. 

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for button with the help of mouse by dragging the border down or right side.
  • Now Click on Design Tab form Office Ribbon then Select the Button icon Form The control group.
  • Now Create a new button by dragging the mouse on Free Space of Form .
  • When you finish then a dialog box appear from which you select Record Operation from Categories list box and Then select Add New Record or Delete Record from Action list box.
  • Now define The caption of Your Button you can write text or select the icon image for your button.
  • Give the name of your button and click on Finish button.

 Creating a List Box

The list box is Input tool when you want to limited the user that rather user write the input values,  he select the values from some predefine values . Then you can use a List Box for this purpose. A List box control displays a list of values or choices and use can select one of them form this list. The list box contains rows of data. If the list has more rows than can be displayed in the control, Access displays a scroll bar in the control.

The process of creating a list box in form

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for List Box.
  • Now Click on Design Tab form Office Ribbon then Select the List Box  icon Form The control group.
  • Now Create a List Box by dragging the mouse on Free Space of Form .
  • When you finish then a List Box wizard will be start and a dialog box appear from which you can Select that how the list box display the values,  rather taking the value form already store table or you type the value for list box. Select any option and click on next button.
  • If you select that List box takes values form table then in Next screen select The table other wise write the values for List box.
  • if you select that List Box Take values from Table and after selecting table you must select the column field from which List Box takes values.
  • After adding the field click on next button.
  • You can also arrange the values in Lit box in next dialog box.
  • In next dialog box values that you selected or enter your self will be display.
  • In next dialog box select the field where these value will be store.
  • Give the name of your List Box and click on Finish button.

 

Creating a Combo Box

combo box is also behave like a List Box but its take little space as one row. when you click on a little arrow on the combo box the pull down list will be open.

The process of creating a Combo box in form

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for Combo Box.
  • Now Click on Design Tab form Office Ribbon then Select the Combo Box  icon Form The control group.
  • Now Create a Combo Box by dragging the mouse on Free Space of Form .
  • When you finish then a combo Box wizard will be start and a dialog box appear from which you can Select that how the combo box display the values,  rather taking the value form already store table or you type the value for list box. Select any option and click on next button.
  • If you select that combo box takes values form table then in Next screen select The table other wise write the values for combo box.
  • if you select that Combo Box Take values from Table and after selecting table you must select the column field from which combo Box takes values.
  • After adding the field click on next button.
  • You can also arrange the values in combo box in next dialog box.
  • In next dialog box values that you selected or enter your self will be display.
  • In next dialog box select the field where these value will be store.
  • Give the name of your combo Box and click on Finish button.

Creating a checkbox

A check box is graphical input which have two stat ON/Yes or OFF/No . If a check box is selected then its ON/Yes and have  value 1 other wise its OFF/NO and have value 0.

The process of creating a Combo box in form

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for Check Box Box.
  • Now Click on Design Tab form Office Ribbon then Select the Check Box  icon Form The control group.
  • Draw a box where you wish to place the new checkbox.

  • After finishing the new checkbox appear with field label.

  • Right-click on the new created checkbox.

  • From the drop-down menu select Properties.

  • The checkbox Properties window will appear on right side of the working window.

  • Click on the Data Tab.

  • Click on Little arrow located next to the box labeled Control Source and select the field you wish to link with new check box form the  drop-down menu.

  • The stat of the Check box must set Yes/No.

  • Give the Label for your new checkbox.

 Creating a Radio Button

Radio buttons also called option buttons which is used to user input in form of  YES or NO. If The radio Button Check then its stat is ON/Yes other wise its stat is OFF/NO. In a group of check box you can select more then one check box ON but in group of Option buttons only one option button have stat ON/Yes.

The process of Creating a Radio Button in form

  • Open the form in design view for this purpose right click on form from navigation section and select design view from drop down list.
  • Now make some space for Check Box Box.
  • Now Click on Design Tab form Office Ribbon then Select the Radio Button  icon Form The control group.
  • Draw a box where you wish to place the new Radio Button.

  • After finishing the new Radio Button appear with field label.

  • Right-click on the new created Radio Button.

  • From the drop-down menu select Properties.

  • The Radio Button Properties window will appear on right side of the working window.

  • Click on the Data Tab.

  • Click on Little arrow located next to the box labeled Control Source and select the field you wish to link with new Radio Button form the  drop-down menu.

  • The stat of the Radio Button must set Yes/No.

  • Give the Label for your new Radio Button.

What is a Report in MS Access?

With Form you can get the data form database on Computer Screen but if any one view form away from computer then you can use A report. Report is  use to get information in such a way that you can print it in shape of hard copy of the document.

You can create report using by wizard or in design view

Creating Report through Wizard

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then click on  the Report Wizard.
  • Select table name and fields in appearing dialog box.
  • Click on field name and click on add > button. you can add all filed by clicking add all >> button
  • In coming dialog box select the group Field if you want other wise leave it and click on next button.
  • In next step select the Filed for Sorting the Output. if you are again nit interested the leave this also.
  • in next dialog box select a Layout and orientation of Report. click  on any layout for example Columnar, Tabular and orientation as Portrait or landscape.
  • The next coming dialog box select a style of you report its just about formatting. click  on any style which you want and click NEXT button.
  • Write The Name of the Report and click on finish button. you can also check the Modify Report check box for modifying the Report for example Inserting Button , Titles and other object in the your report.

Creating Report In Design View

  • Open You database file in Access 2007.
  • Click on Create Manu Tab form Office Ribbon then Select the  Report Deign from this list.
  • This will open a blank Report in Design View.
  • Click On the Design Tab from ribbon and Click on Property Sheet.
  • The  Property Sheet panel appear on right side of design window.
  • In the Property Sheet window select the Report from Selection Type List and click On Data Tab and select the Record Source dropdown list, select the table that contains the fields you want to include in your Report.
  • After selecting a table, click on the Add Existing Fields button on the Access ribbon.
  • Now, in the right panel, you will see a list of all available fields from the Table you chose in previous Step.
  • Double Click on each field which you want to insert in the your Report.
  • For viewing the Report click on the View button on the Access ribbon and select Report View.
  • click on view button again To return to your Report design.
  • For changing The Report Layout Click on Arrange from  Office Ribbon and select the lay out as tabular or columnar. You can also set the auto formatting of the Report from This Menu option by clicking on Auto Format Icon.
  • when finish click the Save icon in the Quick Access Toolbar.
  • Enter a name for the Your Report and Click OK button.

Print Report in Access 2007

Following process is used for printing the report:

  • Open your  Database in Microsoft Access.

  • Open The Report by double clicking on the report name from  Navigation Pane .

  • Click on the Office button and then Select Print.

  • Select a printer in the Print dialog box and also set some necessary option. after this close the  printer properties box.

  • Now Click on Print button.