You are on page 1of 14

I ntroduction to Data Tables

I ntr oduction to D ata Fields


A D atabase Fr om Scr atch
I n t he previous lesson, w e saw t hat you could creat e a dat abase using one of t he available t em plat es. This approach pr ovides you wit h readily m ade obj ect s you can dir ect ly st ar t using. Anot her t echnique consist s of creat ing an em pt y dat abase t hat has no built - in obj ect . St art ing a dat abase from scr at ch allows you t o creat e and add it s differ ent obj ect s w hen necessary. The m ain advant age of t his approach is t hat you w ill exercise as m uch cont r ol as possible on your dat abase because you w ill be creat ing all of your obj ect s. The disadvant age is t hat you w ill m iss t hat pr im ar y layout t hat t he t em plat es offer. Creat ing a dat abase from scrat ch sim ply m eans st ar t ing from a blank dat abase and adding t he different com ponent s. Of course, aft er lear ning how t o per for m som e changes, you will be able t o m odify som e aspect s of a dat abase, whet her cr eat ed fr om a t em plat e or st art ed from scrat ch. To cr eat e a dat abase from scrat ch, if you ar e j ust launching Microsoft Access , in t he left sect ion, you can click Feat ur ing. Then, in t he m ain sect ion in t he m iddle, click Blank Dat abase, give a nam e in t he File Nam e t ext box, and click Creat e.

Pr actical Lear ning: Cr eating a Blank D atabase


1. St art Micr osoft Access 2. To st art a new dat abase, in t he m ain sect ion and under New Blank Dat abase, click Blank Dat abase 3. I n t he r ight sect ion, set t he File Nam e t o Cla rk sville I ce Cr e a m 1 4. Click Cr eat e t o creat e t he new dat abase file

I ntr oduction to Tables


I m agine you cr eat e a list of people. The list can be st ar t ed wit h nam es as follow s: Bill, Jam es, Her m ine, and Khan. This t ype of list is considered one- dim ensional because all of it s it em s fit in one cat egory. I n order t o creat e a m ore det ailed list , you m ay w ant t o include t hese peoples em ail addr esses and pr obably ot her relat ed inform at ion. I f you include t hese addit ional pieces of inform at ion in t he sam e cat egory, t he list m ay becom e confusing. To arrange t he list , you would divide it in cat egor ies. Her e is an exam ple: Nam e Bill Jam es Her m ine Khan @Khan.com Em a il Addr e ss bill@yahoo.com j am esem ail.com ( 102) 399- 2893 ( 101) 447- 8384 Cousin Ph on e N u m be r Re la t ionsh ip Friend

This t ype of display allow s you t o refer t o a piece of inform at ion by it s cat egory. This is t he basis of a t able. A t able is a t wo- dim ensional list of it em s so t hat t he it em s are arr anged by cat egor ies. A com plet e or incom plet e series of it em s t hat r epresent each cat egory is called a record. Therefore, a t able can be r epresent ed as follows:

I n dat abase developm ent , a cat egor y is repr esent ed as a colum n. Som et im es it is also called a field. A r ecor d is repr esent ed as a row .

D atabase Object and Fields


A field is an obj ect used t o host , hold, or st ore a piece of infor m at ion of a dat abase. Before such an obj ect can perform it s funct ion, it m ust first be creat ed. I n t he st rict sense, t he m ost im port ant or t he m ost regular ly used fields of a dat abase ar e creat ed on a t able, but t ables m ay not be t he friendliest w indow s t o present t o a user for dat a ent ry. For t his reason, fields can and should also be creat ed on ot her window s. The pr ocess of m aking a field available depends on t he t ype of obj ect it will reside on and probably how t he field w ill be used. This leads t o t w o cat egor ies of fields: t hose t hat can receive or st ore infor m at ion and t hose t hat can only present or display it . All fields of a t able, especially in Micr osoft Access, ar e creat ed t o st ore dat a. On t he ot her hand, fields on alm ost all of t he ot her obj ect s ( queries, form s, r eport s) can be m ade of com binat ions of already exist ing fields of a t able, or t hey can be cr eat ed independent ly of any exist ing or non - exist ing dat a.

Table Layout
The Table's Tab
A t able is pr esent ed as a rect angular window represent ed in t he m iddle of t he screen wit h a t ab. As an opt ion, you can rem ove t he t abs and let t he t ables display wit hout t hem . To do t his, you can click t he Office But t on and click Access Opt ions. I n t he left fr am e, click Current Dat abase and, in t he right fr am e, in t he Docum ent Window Opt ions sect ion, click t he Tabbed Docum ent s radio but t on and rem ove t he check m ark on t he Display Docum ent Tabs check box:

Aft er m aking t he select ion, you can click OK. You will be asked t o close and reopen t he dat abase:

Which you should do. On t he left side of it s t op sect ion, a t able pr esent s an icon . The t able icon pr ovides a m enu you can access w hen you r ight - click. The m enu allow s you t o save or change t he view of t he t able.

When a t able displays wit h a t ab, t he ext rem e r ight sect ion of t he t ab( s) show s a close but t on you can click t o close t he t able.

The Table System Buttons


I n Microsoft Office Access 2007, by default , a t able in Dat asheet View is r epresent ed w it h a t ab, w hich pr event s t he user fr om m oving it around. I f you w ant , you can m ake t he t ables of a dat abase appear as single docum ent s. To do t his, open t he Access Opt ions dialog box from t he Office But t on and click. I n t he left fram e, click Current Dat abase. Under Docum ent Window Opt ions in t he right fr am e, you can click t he Overlapping Windows radio but t on before clicking OK:

You will be asked t o close and r eopen t he dat abase.

A Table as a D atasheet
Alt hough a t able is prim arily recognized as an ar ranged list of colum ns and r ows, each colum n and each row int ersect t o creat e a rect angular box called a cell:

The cell is act ually t he obj ect t hat holds dat a of a t able. A cell holds only one piece of inform at ion. The dat abase developer decides what t ype of infor m at ion w ould go int o a cell but t he user t ypes t hat inform at ion. Based on it s ar rangem ent of cells, a t able is said t o display in a dat asheet layout or sim ply a dat asheet ( because it s view is m ade of cells) .

The Scr oll Bar s


I f you st art ent ering dat a int o a t able and t here are m or e records t han t he height of t he t able can display, t he t able w ould be equipped wit h a ver t ical scroll bar. The vert ical scroll bar would allow you t o m ove up and down on t he dat asheet . This is useful if/ w hen a t able has m ore records t han can be displayed all at once, and t his w ill happen r egularly. I n t he sam e w ay, if a t able cont ains one or m ore records t han t he widt h of t he t able can display, t he t able w ould be equipped w it h a hor izont al scr oll bar:

The presence or absence of one or bot h scr oll bars is aut om at ically m anaged by t he operat ing syst em and you should not be concerned wit h t he m anagem ent of t he scr oll bar s. At t he sam e t im e, if your users need t o use a t able, t hey know how t o use a scroll bar.

Table N avigation Buttons


The low er left side of t he t able is m ade of four but t ons used t o navigat e t he t able, one but t on used t o creat e a new record , and a t ext box. Each but t on plays a specific role: Bu t t on Nam e Fir st Recor d Previous Recor d Current Recor d Next Record Last Recor d Role Allow s m oving t o t he fir st record of t he t able Allow s you t o m ove one record back ( if t here is one) from t he curr ent r ecord Displays t he num ber repr esent ing t he curr ent r ecor d out of t he t ot al num ber of records Allow s m oving you one record ahead Allow s m oving you t o t he last r ecor d of t he t able

New ( Blank) Recor d Used t o ent er a new record on t he t able

I ntr oduction to Table Cr eation


Table Cr eation
To have a t able as part of your dat abase, you m ust cr eat e it and you have various opt ions. I f you cr eat e a dat abase using one of t he local t em plat es, it w ould pr ovide you wit h a few t ables t hat you can st art using. To use a sam ple t able, aft er st ar t ing a dat abase, on t he ribbon, you can click Creat e. Then, in t he Tables sect ion, click Table Tem plat es t o see a list of sam ple t ables:

From t he m enu t hat appear s, you can click one. This would open a new t able for you. You can t hen save it .

Pr actical Lear ning: U sing a Tem plate Table


1. Open t he Rockville Technologies dat abase cr eat ed in t he previous lesson 2. On t he Ribbon, click Creat e 3. Click Table Tem plat es 4. Click Asse t s

The N am e of a Table
Like everyt hing t hat is par t of a dat abase, a t able m ust have a nam e t hat can be used t o refer t o t hat obj ect t hroughout t he dat abase and in ot her files t hat can be linked t o t he t able. There are t w o m ain w ays you can specify t he nam e of a t able, eit her w hen you save it for t he fir st t im e or if you decide t o r enam e it . To save a t able you have j ust cr eat ed:

You can click t he Office But t on and click Save You can right - click t he Table_X ( such as Table1) t ab and click Save You can press Ct rl + S You can st ar t closing t he t able. You w ould be pr om pt ed t o save t he change ( if it s st r uct ur e has been changed fr om t he st ruct ur e it had befor e it was opened)

I f a t able has not been saved before, you will be asked t o provide a nam e for t he t able. A t able can have alm ost any nam e: Em ployees, 2&&4DG, Pest es, verTT# @t g, et c. Because you and your users should be able t o easily ident ify a t able, t her e are suggest ions you should follow w hen nam ing it :

The nam e of a t able should reflect t he kind of dat a it is holding You can nam e a t able wit h a few w or ds, w it h spaces You can use a prefix t hat ident ifies t he t able as such, a t able. The nam e of a t able w ould be pr eceded w it h t bl. I f t he nam e includes one wor d, such as Musicians, you can give t he t able a nam e like t blMusicians, anot her nam e w ould be t blSt udent s I f t he nam e of t he t able r eflect s a com binat ion of words, such as Bank Account s or St udent s Academ ic Num ber s, you should st art each new w ord wit h an uppercase. Here are exam ples: t blBankAccount s, t blSt udent Academ icNum bers, t blMem ber Regist rat ions. I n our lessons, w e will not use t he convent ion of pr efixing t he nam e of a dat abase obj ect wit h t hree let t ers. For exam ple, t he nam es of t ables w ill not st ar t wit h t bl. We cam e t o t his decision because m ost ot her dat abase environm ent s, including Microsoft SQL Server , do not suggest t his r ule. Alt hough t he lack of t his rule m ay creat e som e confusion, because you will end up having a t able and a form wit h t he sam e nam e, we w ill st rive t o explicit ly st at e what obj ect t ype w e are r eferring t o. For exam ple, we w ill avoid writ ing, " Open Em ployees" or "Open t he Em ployees obj ect " . I nst ead, we will usually st at e, "Open t he Em ployees t able" .

Pr actical Lear ning:Saving a Table


1. To save t he t able, r ight - click Table1 and click Save 2. Set t he nam e of t he t able t o Cor por a t e I t em s 3. Click OK 4. To close t he t able, click it s Close but t on

Table M anagem ent


The Tables in the N avigation Pane
Because t he t able is t he pr im ar y obj ect of a dat abase, w hen you creat e a t able and save it by giving it a nam e, Microsoft Access creat es a sect ion in t he Navigat ion Pane and nam e t hat sect ion aft er t he t able. I n t he sam e w ay, you can have as m any sect ions as t he num ber of t ables on t he dat abase. Here is an exam ple:

As w e will see in t he next lesson, som e obj ect s cr eat ed t hat are based on t he t able would be list ed under t he t able nam e in it s cat egory. Here is an exam ple of t w o obj ect s added t o t he sect ion of a t able nam ed Cust om er s:

Each sect ion is expandable and collapsible. To expand a sect ion, click t he nam e of it s sect ion. t o collapse a sect ion, click t he blue header of it s sect ion. Once a t able has been cr eat ed and saved, it is represent ed in t he Navigat ion Pane w it h an icon and a nam e.

Opening a Table
The m ost regular operat ions you will perform on a t able r equir e t hat you open it first . To open a t able, first locat e it in t he Navigat ion Pane t hen:

You can double- click t he t able You can right - click t he t able and click Open

Any of t hese act ions causes t he t able t o display in Dat asheet View in t he cent ral area of t he screen. I n t he sam e w ay, you can open as m any t ables as necessary.

Closing a Table
Aft er using a t able, you can close it . Before closing a t able, fir st select it s t ab. Then, t o close a t able:

You can click t he close but t on You can press Ct rl + Shift + F4

on t he right side of t he t abs

Selecting a Table
I n or der t o use a t able, som e oper at ions requir e t hat you ( or rat her t he user) first select ( s) it :

To select a t able in t he Navigat ion Pane, sim ply click it

I f you had opened m any t ables and t hey are displaying in t he m ain area of t he screen, t o select one, click it s t ab or it s t it le bar I f you have m any t ables displaying in t he m ain ar ea of t he screen, you can press Ct r l + F6 cont inuously t o swit ch fr om one t able t o t he next unt il t he desired one displays

Renam ing a Table


We saw t hat , when or aft er creat ing a t able, you m ust save it t o m ake it par t of your dat abase. When saving it for t he first t im e, you m ust give it a nam e. I f t he nam e of a t able is not appr opriat e, you can change it . To r enam e a t able, in t he Navigat ion Pane, you can r ight - click t he nam e of t he t able and click Renam e.

Pr actical Lear ning: Renam ing a Table


1. I n t he Proj ect s Navigat ion window , right - click t he Corporat e I t em s t able and click Renam e 2. Type Em ploye e s Re sou r ce s as t he new nam e of t he t able 3. Press Ent er

D eleting a Table
I f you have a t able you don't need anym or e, you can r em ove it from your dat abase. Because you cannot delet e a t able if it is opened, you m ust fir st close it . To rem ove a t able from your dat abase:

I n t he Navigat ion Pane, right - click t he t able and click Delet e I n t he Navigat ion Pane, click t he t able t o select it . Then, on t he ribbon, click Hom e. I n t he Record sect ion, click Delet e I n t he Navigat ion Pane, click t he t able t o select it and press Delet e

I n each case, you will receive a warning t o confirm w hat you w ant t o do. I t is im port ant t o know t hat if you delet e a t able, because it is not a file, it does not go int o t he Recycle Bin: it is lost , including it s records. Ther efor e, before delet ing a t able, m ake sure you really want t o get rid of it . When in doubt , do not delet e it .

Pr actical Lear ning: D eleting a Table


1. I n t he Navigat ion Pane, right - click t he Em ploye e s Resou r ces t able and click Delet e 2. Read t he warning of t he m essage box and click Yes

Tables Colum ns in the D atasheet View


Cr eating a Colum n
Alt hough w e didn't m ent ion it so far, a t able does not exist w it hout a colum n. Put it anot her w ay, a t able m ust have a least one colum n in or der t o have m eaning. This also m eans t hat , in order t o cr eat e a t able, it m ust act ually have at least one colum n. I f you st ar t a t able in Dat asheet View , Micr osoft Access creat es and gives it one default colum n. Once a t able displays in Dat asheet View, you can st art ent ering dat a int o it s cells. I f you do t his, w henever you ent er dat a under a colum n, t hat colum n r eceives an incr em ent al nam e: t he fir st colum n on t he right side of I D would be nam ed Field1, t he second w ould be Field2, and so on. These would be insignificant and can even be confusing. Fort unat ely, you can give m eaningful nam es t o t he colum ns of your t able.

N am ing a Colum n
A colum n can have alm ost any nam e: "Book Tit le", "DG$5@H", "This I s The Book Tit le" , "R8% % DW$4" , et c. Som e colum ns will have only t inny dat a, like a person's age, t he num ber of books in an office, a per sons m iddle init ial, et c. I t m ay not be a good idea t o give t hem a nam e t hat w ould t ake t oo m uch space. I n t he fut ur e, when you st art program m ing, it w ould be easier t o handle field nam es t hat are com posed of only one wor d, w it hout space. To nam e a field, fir st figure out w hat t he dat a in t he cat egory will be m ade of. I f you are planning t o ent er em ployees' salar ies in a field, you can j ust call it Salary. I f you want t o specify em ployees nam es by first nam e, m iddle nam e, and last nam e, you can use such colum n nam es and m ake t hem dist inct . I n t his case, you could nam e t he fir st colum n as fir st nam e, t he last nam e would be called last nam e. Alt hough you can use one w ord nam es, som e people m ight be confused. The suggest ion is t o dist inguish w her ever a new English ( or t he language you are using t o design your dat abase) nam e st art s in t he field nam e, by using a st ar t ing uppercase. I nst ead of fir st nam e or fir st nam e, you can use Fir st Nam e or First Nam e. I nst ead of fullnam e or full nam e, you can use FullNam e or Full Nam e.

Before changing t he nam e of a colum n:


You can double- click it s header You can right - click a colum n and click Re n a m e Colu m n When any cell under a colum n has focus, on t he ribbon, you can first click Dat asheet . Then, in t he Fields & Colum ns sect ion, click Renam e Colum n.

Any of t hese act ions would put t he nam e of t he colum n int o edit m ode. You can t hen t ype t he new desir ed nam e or change t he exist ing nam e.

Pr actical Lear ning: N am ing D atasheet Fields


1. Re- open t he Clar ksville I ce Cream 1 dat abase creat ed earlier 2. To creat e a new t able, on t he r ibbon, click Creat e 3. Click Table 4. Double- click Add N ew Field 5. When it is highlight ed, t ype Or de r D a t e and press Ent er

6. As t he caret in blinking in t he next colum n header , t ype Or der Tim e and pr ess Ent er 7. As t he caret in blinking in t he next colum n header , t ype Con t a ine r and press Tab

8. Close t he t able 9. When asked w het her you want t o save it , click Yes 10. Type Cu st om e rs Or der s as t he nam e of t he t able 11. Click OK

U sing a Tem plate Field


I f you creat e a t able using one of t he t em plat es, it w ould have ready - m ade fields. I f you creat e a t able fr om scrat ch, it m ay lack som e fields. Fort unat ely, Microsoft Access pr ovides m any pre configured fields you can add t o your t able, whet her you cr eat e t he t able based on a t em plat e or fr om scrat ch. These r eady - m ade sam ple colum ns are refer red t o as a Field Tem plat es. Before using a field t em plat e, from t he ribbon, click Creat e and click New Table. This would st ar t a new t able and t he r ibbon would sw it ch t o t he Dat asheet t ab. I n t he Fields & Colum ns sect ion, click New Field. This w ould display t he Field Tem plat es w indow:

By default , t he Field Tem plat es w indow is posit ioned on t he r ight side of t he screen. This is a dockable w indow: you can m ove it t o t he left or place it som ewher e else on t he screen. The it em s in t he Field Tem plat es window ar e organized in cat egories ident ified w it h a labeled node, such as Basic Fields, Asset s, or Cont act s. Each node displays a - but t on. This - but t on indicat es t hat t he node is expanded. To collapse a node, you can click it s - but t on, which becom es a + but t on. To expand a node, you can click it s + but t on. Her e is an exam ple where t he Asset s, t he Cont act s, and t he I ssues nodes are collapsed w hile t he Event s and t he Proj ect s nodes ar e expanded:

To use a field from t he Field Tem plat es w indow :


You can double- click t he field You can click and dr ag t he field fr om t he Field Tem plat es and dr op it on t he t able t o t he left of Add N e w Fie ld :

Pr actical Lear ning: U sing Field Tem plates


1. The Clar ksville I ce Cream 1 dat abase should st ill be opened. To st art a new t able, on t he ribbon, click Creat e 2. Click Table 3. I n t he Fields & Colum ns sect ion of t he Dat asheet t ab, click New Field 4. Under t he Field Tem plat es, expand t he Asset s node if necessary. I n t he Asset s sect ion, double- click M an u fa ct ur e r , M ode l , Acqu ir e d D a t e , and Pu r cha se Pr ice 5. Expand t he Cont act s node if necessary. Under Cont act s, dr ag Com pa ny and drop it bet w een I D and Manufact ur er 6. Right - click Table1 and click Save 7. Set t he nam e t o Com pa n y Asse t s 8. Click OK 9. Click it s Close but t on

Colum ns M aintenance in the D atasheet View


I m por ting a Table and its Colum ns
Alt hough a colum n com plet ely depends on a t able, bot h obj ect s ar e closely relat ed w hen it com es t o t heir m aint enance. I n ot her wor ds, t he m aint enance per for m ed on one obj ect can direct ly affect t he ot her . For exam ple, you can im por t a t able from a t ext file or fr om anot her applicat ion. A t able cannot exist w it hout at least one colum n.

Selecting a Colum n
Som e oper at ions will requir e t hat you select a colum n but it depends on t he operat ion. I n som e cases, when any cell under a colum n has focus ( for exam ple if t he car et is blinking in a cell of a colum n) , t he colum n is consider ed t o be select ed. Ot herw ise:

To select one colum n, posit ion t he m ouse on it s nam e unt il t he cursor point s down and t hen click

To select colum ns in a range, click and hold your m ouse on one of t hem , t hen drag t o t he

left or t o t he right t o cover t he ot her desir ed colum n or colum ns. When all desir ed colum ns are highlight ed, release t he m ouse

To select a r ange of colum ns, click one colum n t hat will be at one end, press and hold Shift , t hen click t he colum n t hat w ill be at t he ot her end, and r elease Shift

Changing the W idth of a Colum n


I f you cr eat e a t able using one of t he Table Tem plat es or if you get a t able from a Dat abase Tem plat e, t he colum ns of t he t ables are w ide enough t o show t heir nam es. I f you cr eat e a t able from scrat ch in t he Dat asheet View, Micr osoft Access assigns it a default w idt h. That w idt h can appear t o be t oo narr ow or t oo wide. For exam ple, w hen dat a exceeds t he r egular w idt h of a colum n, part of t he inform at ion would be hidden. I f a part icular colum n cont ains dat a t hat you w ant t o display at all t im es, you can enlar ge t he colum n. On t he ot her hand, if a colum n displays t inny pieces of inform at ion, you can nar row t he colum n t o let it j ust fit t he dat a as desir ed. There are var ious t echniques you can follow t o w iden or nar row a colum n. To change t he widt h of a colum n:

you can posit ion t he m ouse on t he right bor der of a colum n header. The m ouse point er w ould change int o a horizont al double arrow crossed by a ver t ical line:

I f you double- click, t he colum n would be resized t o t he w idest value of t he colum n, pr ovided t he widest value is w ider t han t he colum n header . I f t he w idest value is narr ower t han t he colum n header , t he colum n w idt h would be widened enough t o display t he nam e of t he colum n.

You can click t he colum n's right bor der and dr ag in t he desired dir ect ion, left or right unt il you get t he desir ed w idt h

You can right - click a colum n's nam e and click Colum n Widt h... This would open t he Colum n Widt h dialog box w here you can t ype t he desired value and click OK

M oving a Colum n
I f you find out t hat a part icular colum n is m isplaced in a t able, you can change it s posit ion. To m ove a colum n in Dat asheet View, first select it , click and hold your m ouse on it . Then, st art dragging left or r ight in t he desired direct ion. While your m ouse is m oving, a t hick vert ical line w ill guide you. Once t he ver t ical line is posit ioned t o t he desired locat ion, release t he m ouse:

To m ove a group of colum ns, first select t hem as we r eviewed earlier, click and hold t he m ouse on one of t he select ed colum ns, st ar t dr agging left or r ight in t he desired dir ect ion unt il t he t hick vert ical guiding line is posit ioned in t he desired locat ion, t hen release t he m ouse:

I nser ting a Colum n


I nser t ing a colum n consist s of adding one bet ween t wo exist ing fields. Ther e are various w ays you can do t his:

To inser t a colum n using t he ribbon, first click a cell under t he colum n t hat will succeed it . Then, in t he Fields & Colum ns sect ion of t he Dat asheet t ab, click t he I nsert but t on To inser t a colum n fr om t he t able, right - click t he colum n t hat w ill succeed it and click I nsert Colum n To inser t a field from t he Field Tem plat es, click and drag it from t he Field Tem plat es and dr op it t o t he left of t he colum n t hat w ill succeed it

Pr actical Lear ning: I nser ting a Colum n


1. The Clar ksville I ce Cream 1 dat abase should st ill be opened. I n t he Navigat ion Pane, double- click t he Cust om er s Or de r s: Table t o open t he t able 2. To add a new field, r ight - click t he Order Dat e colum n header and click I nser t Colum n 3. Click t he em pt y cell under Cont ainer 4. On t he ribbon, click Dat asheet if necessar y. I n t he Fields & Colum ns sect ion, click t he I nser t but t on

Renam ing a Colum n


We saw var ious t echniques of nam ing a colum n. You can use t he sam e approach t o change t he nam e of a colum n. To put t he nam e of a colum n int o edit m ode and t hen change it :

You can double- click it s nam e on t he header You can right - click t he colum n's nam e and click Ren a m e Colum n When any cell under t he colum n has focus, on t he ribbon, click Dat asheet , in t he Fields & Colum ns sect ion, click t he Renam e but t on

Pr actical Lear ning: Renam ing a Colum n


1. The Clar ksville I ce Cream 1 dat abase should st ill be opened.

Right - click t he Field1 colum n header and click Renam e Colum n 2. Type Cle rk and press Ent er 3. Click t he em pt y cell under Field2 4. I n t he Fields & Colum ns sect ion of t he r ibbon, click t he Renam e but t on 5. Type Fla vor and press Ent er 6. Close t he t able

H iding and Revealing a H idden Colum n


I f a t able cont ains m any colum ns and at one t im e you t hink you don't need all of t hem , you can hide som e. To hide a colum n, you can dr ag t he r ight border of it s colum n header com plet ely t o it s left bor der as we saw ear lier t o change t he w idt h of a colum n; w hen t he vert ical guiding line reaches t he left bor der, release t he m ouse: t he colum n would be hidden from t he t able:

To hide one or a group of colum ns, you can right - click and click Hide Colum n. You can also right - click any colum n and click Unhide Colum n. This w ould open t he Unhide Colum ns dialog box. Her e is an exam ple:

To hide a colum n, clear it s check box. To r eveal a colum n or a group of colum ns pr eviously hidden, right - click any colum n header on t he t able and click Unhide Colum n. I n t he Unhide Colum ns dialog box, put a check m ar k on each colum n you want t o show.

D eleting a Colum n
I f you have an undesirable colum n in a t able, you can delet e it . I t is im port ant t o keep in m ind t hat if you delet e a colum n, it also goes w it h any infor m at ion under it . To rem ove a colum n from a t able:

You can right - click t he colum n's nam e and click Delet e Colum n You can select t he colum n ( or a group of colum ns) , r ight - click anywhere in t he t able and click Delet e Colum n

You can select a colum n ( or a group of colum ns) . Then, in t he ribbon, click Dat asheet . I n t he Fields & Colum ns sect ion, click t he Delet e but t on

Any of t hese act ions would pr esent you a warning t o confir m whet her you st ill w ant t o delet e t he colum n( s) or you want t o change your m ind. I f you st ill want t o r em ove t he colum n( s) , click Yes.

Lesson Sum m ar y
M CAS: U sing M icr osoft Office Access 20 0 7 Topics
C1 C2 C3 E2 Creat e dat abases Creat e t ables Modify t ables Navigat e am ong records

Exer cises Yugo N ational Bank


1. Cr eat e a blank dat abase and nam e it Yu go N a t ion a l Ba n k 1 2. Double- click Add New Field and t ype Accou n t Type 3. Add one m or e colum n nam ed D e scr ipt ion 4. Change I D t o Accoun t TypeI D 5. Save t he t able as Accou n t Type s

W atts A loan
1. Cr eat e a blank dat abase and nam e it W a t t s A Loa n 1 2. Aft er t he default I D colum n, creat e t he following addit ional colum ns: Fir st N a m e , M iddleN a m e , La st N a m e , Addr e ss , Cit y , St at e , ZI PCode , Cou nt ry , H om ePh on e , W or k Phone , Em a ilAddr ess , and N ot e s 3. Renam e t he I D colum n as Cu st om e r I D , 4. Save t he t able as Cu st om e r s

You might also like