Microsoft Access

 

Creating a Table:

Select tableà Newà Design viewà Spread Sheet like appearance-->enter the Field Name in the File Name column and Choose the Data Type

Data Type à ..the type of data that is entered in the input field. For e.g. it might be a number,or text, date/time, currency, Autonumber, Yes/No, the different options that are given. Number has various options like Long Integer etc. Text by default is 50 characters long but it can be always be changed.

Data/Timeà used where the user enters the date/time as input.

Currencyà A pre-formatted currency field is provided by Access. It also has various options.

AutoNumberà This generates automatic numbers and this is computer generated. It serially counts from 1 and increments it for every new record automatically. We don�t have a hold on this i.e. we cannot change it.

Yes/Noà to use the input field as a check box.

Primary Key à We can assign one/more of the field/s to be the Primary Key for a table and this field/s the uniquely identifies a specific row in the table.

Once the field names are given and the data type is assigned we can go ahead and close this window and on doing this it asks for the name of the table. Give a table name and the structure you defined using the above steps is in the form of a table. To do any design modifications we can always select Design button and get back to the same window.

Creating a Form for Data Entry:

Click on Forms à Choose Newà Form Wizard which asks for the Fields that are to be appearing in the input form. We can be selective or just hit the >> to choose every one of them.

Hit Next after selecting the fields. Then there is a choice of Columnar or Tabular or Data-sheet, which is the appearance of the form.

Choose one option and Hit Next. Choose a proper background and then hit Next The default name is given to the form as the same name as that of the Table. You can always change it.

Hit Finish the form pops up ready for data entry.

Now that you have created the form for data entry we can go ahead and enter data into the table that was created in the previous steps by using this form interface.

Creating the Queries:

Click on Queriesà Newà Design Viewà Add the table/s that you want to Query.

Select the fields that U wants to query from the drop down list. You can select all by using Tablename.* but this doesn�t allow you to specify any conditions.

To specify a condition click on the Criteria row and just type in the criterion that is needed.

For e.g. if you want all The Rubins � (Lastnames) in the database, we can specify in the Criteria Row of the last name and type Rubin. If we need to look up more than one Last name like Rubin and Ramirez we can do this by entering "Rubin or Ramirez" in the criteria row.

At the top left corner under the Field we have an icon like a drop down list. If want to know the SQL syntax of the Query created we can open it up by selecting the SQL View. We can also edit this SQL statement.

Creating Reports:

Click on Reportsà Newà Report Wizardà OKà It will come up with a dialog box where you have to select the fields that you want in the report.

If you click the >> sign you will get all the fields on the report or if you click the > and individually select the fields.

Once the selection is done Hit Next.

Another window will prompt you to enter the grouping pattern, for e.g. if there are different company entries and we want to group by companies, we can select the company name as the group we are interested.

On clicking on the Next we get to another window where we can sort on the different fields that you want. You may or may not select the field name and it depends on the need for having it sorted.

Then Hit Next which gives you many options as to how the layout of the report should look like.

Once a choice is made hit Next and then it will ask the style that the report should be in. Select one and hit Next By default the report name will be same as the table name. We can go ahead and hit Finish at this point and the report will pop up.

Now that the report is ready we can print it out or if you don�t like the design, we can make the design changes by clicking on the design button and having the report name highlighted.

We can have reports based on a particular query or a whole table.

Creating Macros:

Click on Macrosà Newà We get to a window that says Action and Comments.

If you click on the action window we get a pull down list of actions that are predefined. We can choose Open form and assign the form name.

This macro can be assigned to a button and on clicking this button the form opens up.

Or if you want the form to be opened first when you open the database you can put it in the start up.

Apart from using the built in actions we can define our own actions by selecting the button on the tool bar which says Macro Names. By this we can give any name or use any of the function keys and assign them some action, such as opening a calculator or a telnet window. This makes the interface friendlier.

 If you have any questions, please mail to sanjeev@utep.edu.