Ms Access(50)PAGE2

Embed Size (px)

Citation preview

  • 8/9/2019 Ms Access(50)PAGE2

    1/3

    Create a table (MDB) using MS-Access :-

    Applies to: Microsoft Oce Access 2003

      Show All

    Create a table by using the Table Wizard

    ! "ress # to switch to the Database window (Database window: The window that a$$ears when youo$en an Access database or an Access $ro%ect! &t dis$lays shortcuts 'or creating new database ob%ects ando$ening eisting ob%ects!)!

    ! Clic* Tables  under Objects+ and then clic* New on the Database window toolbar!

    ,! Double-clic* Table Wizard!

    &' the wizard doesnt start

    .! #ollow the directions in the Table Wizard dialog boes!

    (Design /iew: A window that shows the design o' these database ob%ects: tables+ 0ueries+ 'or1s+ re$orts+ 1acros+and data access $ages! &n Design /iew+ you can create new database ob%ects and 1odi'y the design o' eistingones!)

    Create a table in Design /iew

    ! "ress # to switch to the Database window (Database window: The window that a$$ears when youo$en an Access database or an Access $ro%ect! &t dis$lays shortcuts 'or creating new database ob%ects ando$ening eisting ob%ects!)!

    ! Clic* Tables  under Objects+ and then clic* New on the Database window toolbar!

    ,! Double-clic* Design View!

    .! De'ine each o' the 'ields in your table!

    2ow3

    ! 4$en the table in Design /iew (Design /iew: A window that shows the design o' thesedatabase ob%ects: tables+ 0ueries+ 'or1s+ re$orts+ 1acros+ and data access $ages! &n Design /iew+ youcan create new database ob%ects and 1odi'y the design o' eisting ones!)!

    ! To insert the 'ield within the table+ clic* in the row below where you want to add the 'ield+ and

    then clic* Insert Rows  on the toolbar!

    To add the 'ield to the end o' the table+ clic* in the 'irst blan* row!

    ,! Clic* in the Field Name colu1n and ty$e a uni0ue na1e 'or the 'ield!.! &n the Data Type colu1n+ *ee$ the de'ault (Text)5 or clic* in the Data Type colu1n+ clic* thearrow+ and select the data ty$e (data ty$e: The characteristic o' a 'ield that deter1ines what ty$e o' datait can hold! Data ty$es include Boolean+ &nteger+ 6ong+ Currency+ Single+ Double+ Date+ String+ and7ariant (de'ault)!) you want!

    8! &n the Description colu1n+ ty$e a descri$tion o' the in'or1ation this 'ield will contain! Thisdescri$tion is dis$layed on the status bar (status bar: A horizontal bar at the botto1 o' the screen thatdis$lays in'or1ation about the current condition o' the $rogra1+ such as the status o' ite1s in thewindow+ the $rogress o' the current tas*+ or in'or1ation about the selected ite1!)  when adding data tothe 'ield and is included in the 4b%ect De'inition o' the table! The descri$tion is o$tional!

    http://office.microsoft.com/en-us/access/FX100646921033.aspxhttp://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://togglediv%28%27divexpcollasst_4%27%29/http://togglediv%28%27divexpcollasst_3%27%29/http://togglediv%28%27divexpcollasst_2%27%29/http://togglediv%28%27divexpcollasst_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_1_1%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdatabasewindow_3_3%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27defdesignview_4_4%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofdatatype_5_5%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://appendpopup%28this%2C%27ofstatusbar_6_6%27%29/http://office.microsoft.com/en-us/access/FX100646921033.aspx

  • 8/9/2019 Ms Access(50)PAGE2

    2/3

    8! De'ine a  $ri1ary *ey ($ri1ary *ey: 4ne or 1ore 'ields (colu1ns) whose /alues uni0uely identi'y eachrecord in a table! A $ri1ary *ey cannot allow 9ull /alues and 1ust always ha/e a uni0ue inde! A $ri1ary *eyis used to relate a table to 'oreign *eys in other tables!) 'ield be'ore sa/ing your table!

    2ow3

    ! 4$en a table in Design /iew (Design /iew: A window that shows the design o' thesedatabase ob%ects: tables+ 0ueries+ 'or1s+ re$orts+ 1acros+ and data access $ages! &n Design /iew+ youcan create new database ob%ects and 1odi'y the design o' eisting ones!)!

    ! Select the 'ield or 'ields you want to de'ine as the $ri1ary *ey ($ri1ary *ey: 4ne or 1ore'ields (colu1ns) whose /alues uni0uely identi'y each record in a table! A $ri1ary *ey cannot allow 9ull/alues and 1ust always ha/e a uni0ue inde! A $ri1ary *ey is used to relate a table to 'oreign *eys inother tables!)!

    To select one 'ield+ clic* the row selector (row selector: A s1all bo or bar that+ when clic*ed+ selects anentire row in table or 1acro Design /iew+ or when you sort and grou$ records in re$ort Design /iew!)  'or the desired 'ield!

    To select 1ulti$le 'ields+ hold down the CT6 *ey and then clic* the row selector 'or each 'ield!

    ,! Clic* Primary ey  on the toolbar!

    NOT! &' you want the order o' the 'ields in a 1ulti$le-'ield $ri1ary *ey to be di''erent 'ro1 the order o' those

    'ields in the table+ clic* Indexes  on the toolbar to dis$lay the &ndees window (&ndees window: &n an Access database+ a window in which you can /iew or edit a tables indees or create 1ulti$le-'ield indees!)+and then reorder the 'ield na1es 'or the inde (inde: A 'eature that s$eeds u$ searching and sorting in a tablebased on *ey /alues and can en'orce uni0ueness on the rows in a table! The $ri1ary *ey o' a table isauto1atically indeed! So1e 'ields cant be indeed because o' their data ty$e!) na1ed "ri1ary;ey!

     NOT! nter your data in the datasheet!

    >nter each *ind o' data in its own colu1n (each colu1n is called a 'ield ('ield: An ele1ent o' a table thatcontains a s$eci'ic ite1 o' in'or1ation+ such as a last na1e! A Title 'ield 1ight contain Mr! or Ms! Databasessuch as Microso't S?6 Ser/er re'er to 'ields as colu1ns!) in Microso't Access)! #or ea1$le+ i' you are entering

    http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defrowselector_10_10%27%29/http://appendpopup%28this%2C%27defrowselector_10_10%27%29/http://appendpopup%28this%2C%27defrowselector_10_10%27%29/http://appendpopup%28this%2C%27defindexeswindow_11_11%27%29/http://appendpopup%28this%2C%27defindexeswindow_11_11%27%29/http://appendpopup%28this%2C%27defindexeswindow_11_11%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/http://togglediv%28%27divexpcollasst_6%27%29/http://togglediv%28%27divexpcollasst_5%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defprimarykey_7_7%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defdesignview_8_8%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defprimarykey_9_9%27%29/http://appendpopup%28this%2C%27defrowselector_10_10%27%29/http://appendpopup%28this%2C%27defrowselector_10_10%27%29/http://appendpopup%28this%2C%27defindexeswindow_11_11%27%29/http://appendpopup%28this%2C%27defindexeswindow_11_11%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defindex_12_12%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27defdatabasewindow_13_13%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/http://appendpopup%28this%2C%27offield_14_14%27%29/

  • 8/9/2019 Ms Access(50)PAGE2

    3/3

    na1es+ enter the 'irst na1e in its own colu1n and the last na1e in a se$arate colu1n! &' you are enteringdates+ ti1es+ or nu1bers+ enter the1 in a consistent 'or1at so that Microso't Access can create an a$$ro$riatedata ty$e (data ty$e: The characteristic o' a 'ield that deter1ines what ty$e o' data it can hold! Data ty$esinclude Boolean+ &nteger+ 6ong+ Currency+ Single+ Double+ Date+ String+ and 7ariant (de'ault)!)   and dis$lay'or1at ('or1at: S$eci'ies how data is dis$layed and $rinted! An Access database $ro/ides standard 'or1ats 'or s$eci'ic data ty$es+ as does an Access $ro%ect 'or the e0ui/alent S?6 data ty$es!