SETHA SITE INFORMATION

  • Increase font size
  • Default font size
  • Decrease font size
Microsoft Access

How to Insert, Delete, Update Data in MS-Access 2010 Using MS-Access Blank Form

E-mail Print PDF
Before reading this article you might need to read two prerequisites article as below:
  1. How to Create New Blank Database in Microsoft Access 2010
  2. How to Create Table in Microsoft Access 2010
This article shows you how to:
  • Create Form (Non-wizard Form) in Microsoft Access 2010
  • Design your own Form using TextBox, ComboBox, Command button and Subform control
  • Write VBA (Visual Basic for Application) Programming to Insert, Delete and Update data in MS-Access Table
  • Use SQL statements to Insert, Delete and Update Data in MS-Access Table

Download Sample Here
 
See video below
Part 1:

Part 2:
 

How to Create Table in Microsoft Access 2010

E-mail Print PDF

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.

Create New Table in Microsoft Access 2010
  • Click on Create Tab
  • Click on Table Design Button
  • You will see the table designation windows appear
  • Enter fields name and its data type as below:
  • Set field stdid to Primary Key (Not allow duplicate data for stdid) by Right Click on that field and choose Primary Key
  • Click <Ctrl-S> to Save the Table
 

How to Create New Blank Database in Microsoft Access 2010

E-mail Print PDF

This article shows you how to create new blank database in Microsoft Access 2010. This article is targeted to the beginner of Microsoft Access 2010.

  • Open Microsoft Access 2010 from Start Menu
  • Click on the Blank database (on the middle page of MS-Access start page)
  • Enter Database File Name (example: student.accdb) (on the right page of MS-Access start page)
  • Click button Create
  • One database is created
  • Continue to create table in Microsoft Access 2010
 

How to Set Database Password in Microsoft Access 2007

E-mail Print PDF
This article shows you how to set database password in Microsoft Access 2007 whether its format is *.mdb or *.accdb.
  1. Open existing database or create new database (.mdb or .accdb)
  2. Click on Database Tools tab
  3. Click on Set Database Password

    If you have problem here, please follow instructions below:
    1. Click on Microsoft Office Button
    2. Click on Close Database
    3. Click on Microsoft Office Button again
    4. Click Open Under the Office Button (Open Dialog Windows is Appeared)
    5. Choose database file (eg. ...\bin\debug\data.mdb)
    6. Click the Drop-down of Open Button
    7. Choose Open Exclusive
  4. Click on Database Tools -> Set Database Password
  5. One Dialog appears for you to set password (Enter your password)
  6. Done
 

How to Create Customized Ribbon in Microsoft Access 2007

E-mail Print PDF

This article shows you one scenario about how to create a customized Office Fluent Ribbon in Microsoft Access 2007. This article applies to only Microsoft Office Access Database not include the Microsoft Office Access Project (*.ADP). To customized our own Ribbon we need to know some of XML markup text.

Scenario for creating customized Office Fluent Ribbon in Microsoft Access 2007

  • Step 1: Create New Project Database or Open your existing Project Database
  • Step 2: Create New Table named USysRibbons with the following fields:
    Field NameData TypeDescription
    RibbonNameTextUnique name that identifies the UI extensibility customizations in the RibbonXML field.
    RibbonXMLMemoRibbonXML that describes a set of customizations to be applied to the Office Fluent UI.
  • Step 3: Create one Tab named Home
    Add New record to USysRibbons table as below:
    Field NameContent
    RibbonNameHome
    RibbonXML
    <customUI 
     xmlns="http://schemas.microsoft.com/office/2006/01/customui">
     <ribbon startFromScratch="true">
      <tabs>
       <tab id="tabMain" label="Home">
       </tab>
      </tabs>
     </ribbon>
    </customUI>
    

    * Note: Use <tab id="..." label="..."></tab> tag to create Tab on Ribbon.
  • Step 4: Set your customized Ribbon as the Startup Ribbon
    • Close and restart the application.
    • Click the Microsoft Office Button, and then click Access Options.
    • Click Current Database in the left pane.
    • In the Ribbon and Toolbar Options section, select the Home Ribbon in the Ribbon Name list.
    • Close and restart the application.


     
  • Step 5: Create Group named List
    Modify the above record in USysRibbons table as below:
    Field NameContent
    RibbonNameHome
    RibbonXML
    <customUI 
     xmlns="http://schemas.microsoft.com/office/2006/01/customui">
     <ribbon startFromScratch="true">
      <tabs>
       <tab id="tabMain" label="Home">
          <group id="grpList" label="List">
          </group>
       </tab>
      </tabs>
     </ribbon>
    </customUI>
    

    * Note: Use <group id="..." label="..."></group> tag to create Group under the Tab of Ribbon.

     
  • Step 6: Create Button in List Group
    Just modify the record in USysRibbons table as follow
    Field NameContent
    RibbonNameHome
    RibbonXML
    <customUI 
     xmlns="http://schemas.microsoft.com/office/2006/01/customui">
     <ribbon startFromScratch="true">
      <tabs>
       <tab id="tabMain" label="Home">
          <group id="grpList" label="List">
            <button id="cmdBook" label="Book" size="large" 
                supertip="Click here to show list of book"/>
          </group>
       </tab>
      </tabs>
     </ribbon>
    </customUI>
    

    * Note: Use <button id="..." label="..." site="..." supertip="..."></button> tag to create Button in the Group under the Tab of Ribbon.

     
  • Step 7: Add Image to Button
    Modify the above record in table USysRibbons by adding the imageMso attribute into the <button> tag as follow:
    <button id="cmdBook" label="Book" size="large" 
      imageMso="ControlLayoutStacked" 
      supertip="Click here to show list of book"/>
    


     
  • Step 8: Add Action Click on Button
    • Modify the above record in table USysRibbons by adding onAction attribute into the <button> tag as follow:
      <button id="cmdBook" label="Book" size="large" 
        onAction="macRibbons.btnBookClick" 
        imageMso="ControlLayoutStacked" 
        supertip="Click here to show list of book"/>
      
    • Create a macro object named macRibbons
      • Add one macro named cmdBookClick in macRibbons object
      • Choose Action: RunCode
      • In Function Name at the bottom write: btnBookClick()
    • Create function named btnBookClick() in VBA code in a module as follow:
      Public Function btnBookClick()
          MsgBox "Testing click on Book Button"
      End Function
      
    • Close and restart your application

Ref:http://msdn.microsoft.com/en-us/library/bb187398(v=office.12).aspx