Microsoft Access
  Home arrow Microsoft Access arrow Page 2 - Scripting a Data Access Page: a Simple Exa...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Scripting a Data Access Page: a Simple Example
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2006-05-30

    Table of Contents:
  • Scripting a Data Access Page: a Simple Example
  • Creating a data access page
  • Adding a script to this page
  • Saving and Displaying the Data Access Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Scripting a Data Access Page: a Simple Example - Creating a data access page


    (Page 2 of 4 )

    For a data access page, everything about the page is stored in an HTML file, instead of an mdb file. Let's begin by creating a new data access page. Open the Access program and click on  File-->New. In the New File navigation window on the right, click on Blank Data Access Page. Click on New Source...  This opens the Select Data Source dialog as shown below. There are a number of sources already present, created for other programs on this machine. Click on the New Source... button.

    This opens the Data Connection Wizard with the Welcome screen. Choose Other/advanced by highlighting and clicking on the Next> button.

     This opens up the Data Link Properties window with Microsoft Jet 4.0 OLE DB Provider as shown.

    Click on the Next> button.  In the connection tab, use the ellipsis button and browse to the Northwind database. On this machine it is at: C:Program FilesMicrosoft OfficeOFFICE11 SAMPLES Northwind.mdb  You may test the connection and this should say that you succeeded. Accept the default username Admin and you may also place a check mark for the Blank password checkbox as shown. Click OK.

    In the screen that pops up as shown in the next picture, you need to select a database and table from the dialog Select Database and Table. However for the mdb file, all that you will be choosing will be the whole database.

    Click on the button Next> in the above screen. At this point you will be required to save the data connection and finish the wizard. You need to make suitable entries: give a filename, and add some description and keyword(s) as shown in the next picture. Keywords help if someone wants to search the pages.

    Now click on the button Finish. You will finally save this file as an ScriptExple.odc file.

    Click on the button labeled Open in the above window now. This opens up the data access page in design view as shown. You are given a hint to add fields by dragging fields from field list as shown.

    Go to View in the main menu, and from the drop-down click on FieldList to reveal the tables/fields as shown here.

    Highlight Company Name, Contact Name, City and Address holding down the Control key as shown. Drag and drop the group onto the design pane as shown in the next picture. You will be asked to choose a layout style by the Layout Wizard. Accept the default and click OK

    Work on your controls by adjusting widths and alignments so that they show clearly, as shown in this picture.

    Add a label to the area above the dragged elements as shown. Right click the label, go to the other tab and change its innerText from Label0 to Test as shown.

    This changes the label caption on the design page to "Test" as shown in the next picture.

    Now click on View-->Page View from the menu item to see how it appears when it is displayed on the web browser.

    More Microsoft Access Articles
    More By Jayaram Krishnaswamy


       · Using the built-in wizards you can do a lot, but with scripting you can do even...
     

    MICROSOFT ACCESS ARTICLES

    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access
    - Configuring a Linked Microsoft Access Server...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT