+ All Categories

Access

Date post: 10-Nov-2015
Category:
Upload: raidenyasahiro
View: 2 times
Download: 0 times
Share this document with a friend
Description:
Access
Popular Tags:
21
Questions And Discussion Question 1 How to Create Table in Microsoft Access 2010 After you created new blank database you will see one table is created named Table1 which is not yet save. If you do not prefer to continue with that default table just click on the x button on the right hand side without saving. Click on Create Tab 1. Click on Table Design Button You will see the table designation windows appear 2. Enter fields name and its data type as below: 3. Set field stdid to Primary Key (Not allow duplicate data for stdid) by Right Click on that field and choose Primary Key: 4. Click <Ctrl-S> to Save the Table:
Transcript

Questions And DiscussionQuestion 1How to Create Table in Microsoft Access 2010

After youcreated new blank databaseyou will see one table is created named Table1 which is not yet save. If you do not prefer to continue with that default table just click on the x button on the right hand side without saving.Click onCreate Tab1. Click onTable Design Button

You will see the table designation windows appear2. Enter fields name and its data type as below:

3. Set fieldstdidtoPrimary Key(Not allow duplicate data for stdid) byRight Clickon that field and choose Primary Key:

4. Click to Save the Table:

Question 2 How to Create a Query1. Select theCreatetab on the Ribbon, and locate theQueriesgroup.2. Select theQuery Designcommand.

3. Access will switch toQuery Design view. In theShow Tabledialog box that appears, select the table you would like to run a query on. ClickAdd, then clickClose. We are running a query about our customers, so we will add theCustomerstable.

4. The selected table will appear as a small window in theObject Relationship Pane. In the table window, double-click thefield namesyou would like to include in your query. They will be added to theDesign Gridin the bottom part of the screen.

In our example, we want to mail invitations to customers who live in a certain area, so we'll include thefirst andlast name,street address,city,state, andzip codefields. We aren't planning on calling or emailing our customers, so we don't have to include thetelephoneoremailfields.

5. Set thesearch criteriaby clicking on the cell in theCriteria: rowof eachfieldyou would like to filter. Typing criteria into more than one field in the Criteria: row will set your query to include only results that meet all the criteria. If you want to set multiple criteria but don't need the records shown in your results to meet them all, type the first criteria in the Criteria: row and additional criteria in theOr:rowand the rows beneath it.

For this one-table query, we'll use very simple search criteria. We want to find our customers who live in a city calledRaleigh, so in ourCityfield, we'll type"Raleigh". Typing "Raleigh" inquotation markswill retrieve all records with anexact matchfor "Raleigh" in the City field. Some customers who live in the suburbs live fairly close, and we'd like to invite them as well. We'll add theirzip code,27513, as another criteria. Since we want to find customers who either live in Raleighorin the 27513 zip code, we'll type "27513" in theor:row of theZip Codefield.

6. After you have set your criteria,runthe query by clicking theRuncommand on theQuery Tools Designtab.

7. The query results will be displayed in the query'sDatasheet View, which looks like a table. If desired,save your query by clicking theSavecommand in the Quick Access toolbar. When prompted to name it, type in the desired name, then clickOK.

Question 3How to create a FormLaunch Access, create tables and define relationships among them. For demonstration purpose I have added four tables in database, build relationships among them with enforcing referential integrity and cascaded (update and delete) related fields.1. Relationship among tables can be seen in the screen shot below.

~For pulling out data from tables, query is created that automatically fills in the corresponding fields.

2. When we will fillAddictive_IDfield, query will automatically pull out corresponding row (Student Name, Phone Noand Address) from original tables.

3. To begin with creating forms navigate to Createand clickForm.

4. Access will automatically create the Form, show it inForm layoutview and assign the name of query used. You can also selectForm Design, Blank FormorForm Wizardto create forms.

~You can add labels, buttons, text boxes, images and graphs to make the process of entering and working with data much easier and more accurate.5. Navigate toViewdrop-down menu and clickDesign.

6. Now Head over toDesigntab and selectButtonto insertbutton in the Form

Question 4How To create a reports1. Launch Access,create tablesand definerelationshipsamong them. For demonstration purpose I have added four tables in database, build relationships among them with enforcing referential integrity and cascaded (update and delete) related fields.

2. Relationship among tables can be seen in the screenshot below.

3. For pulling out data from tables,queryis created that automatically fills in the corresponding fields.

4. When we will fillAddictive_IDfield, query will automatically pull out corresponding row (Student Name, Phone Noand Address) from original tables.To begin with creating reports, navigate to Createand clickReport Wizard.

5. You will reach aReport Wizarddialog, Select the query which contains all the relationships among tables, and hitAddbutton. You will see all the fields of the tables move toSelected Fields.ClickNext.

6. In this step you can choose the desired report view. ClickNext toproceed further.

7. Now you can choose any grouping levels you want to add, if you want to view report through a certain group and and change priorities, click the add (>) button. But we will stick with the default settings for it. ClickNext.

8. Here you can specify sorting order (Ascending or Descending) for the records but we will leave these options. ClickNextto proceed further.

9. Select the layout of the report in this step, selectJustifiedfrom the right pane and enableAdjust the field widthoption, to take a better and compact view of the report.

10. Finally choose appropriate name for the report. You can either selectPreview the reportorModify the reports designto view report in design view to perform more operations. ClickFinishto end the report.

11. Now you can see the report is created through the Report Wizard. You can apply new themes over the report to make it look more professional.

Question 5How to creat a Relationships1. Launch Access 2010, navigate toDatabase Toolson new Access ribbon and clickRelationshipsbutton.

2. Access will openRelationshipstab withShow TableDialog box. Select tables, queries or both, and hit Add.

3. You will see selected tables/queries small windows with columns names inRelationships window. In this example I am using only four tables (AddictiveTips Example, Courses, Lecturer, Mark Sheet).

4. You will see one-many relationship created betweenAddictiveTips Examples IDandcourse code.

5. To create one-one relationship with enforcing referential Integrity, ~HoldAddictiveTips Examples ID,drag and drop it overMark Sheets Id. ~Edit Relationshipdialog box will appear. ~Now enableEnforce Referential Integrity (ensure consistency&validates ~corresponding entries)&Cascade Delete Related Recordscheckbox (ensures removal of all related data fromMark Sheetwhen AddictiveTips Examples ID is deleted ).

6. These three options are similar to SQLsinner join, outer join andright outerjoin. Select a join type and Hit OK.

7. ClickCreateto make 1-1 relationship betweenAddictiveTips Examples IDandMark Sheets Id.

~This is the simplest form of relationships among tables/queries. It becomes much complex and elusive as it grows.

8. Relationships make it possible to co-relate and ensure data consistency from table to table. Now you can unleash power of Access 2010 by creating more tables and making relationships with them.


Recommended