Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Hyperlink Opens Objects from Another Database

Introduction.

Hyperlinks in Microsoft Access provide a convenient way to open internal or external objects without the need to write Macros or VBA code. The Hyperlink Address and Hyperlink SubAddress properties are available for Label controls, Command Buttons, and Image controls.

We have already explored a few examples of using hyperlinks, and links to those articles are provided at the end of this page for reference.

If you haven’t experimented with these properties yet, let’s walk through a demo to understand how both properties can be used effectively.

The Sample Trial Run.

  1. Create a new Blank Form.
  2. Insert a Label control on the Form.
  3. While the label control is still in the selected state, display its Property Sheet (F4).

    Note: Hyperlink Address and Hyperlink SubAddress Properties are used for different purposes.

    • Hyperlink Address: for opening external objects, like Word Documents, Excel Worksheets, .PDF files, etc.
    • Hyperlink SubAddress: for opening internal objects, like Forms, Reports, Tables, Queries, and Macros.

    Let us open a Report from your database using the Hyperlink SubAddress property setting.

  4. Find the Hyperlink SubAddress property and write the following text into it:
    Report <Your Report Name>

    Replace <Your Report Name> text with one of your own report names (without the < > brackets). The correct format for writing a value into this property is <Object Type>, i.e., Form, Report, Table, Query, or Macro, followed by a space, followed by the actual object name.

  5. Change the Caption Property value of the Label to Open Report.
  6. Save the Form, with the Label control's Hyperlink SubAddress value set with the above changes.
  7. Open the Form in normal view and click on the label control.

You will see how your report is open in Print Preview.

Opening an Excel or Word File.

Now, try opening an MS-Word Document using the other property, the Hyperlink Address setting.

  1. Open your Form and create a second Label control on it.

  2. Display the property sheet of the label control.

  3. Change the Caption property value to Open Word Doc.

  4. Set the Hyperlink Address property value with the full pathname of a Word Document on your computer, like C:\My Documents\Letter.doc 

  5. Save the Form with the changes.

  6. Open the Form in normal view and click on the second label to open the Document in MS Word.

Note: You can open Web pages by setting the Hyperlink Address property value to a web address, say https://www.msaccesstips.com

The HyperLink Base.

If your external files, which you plan to open in Access, are all in one location C:\My Documents\ then you don’t need to duplicate it in every control but to specify the Path (C:\My Documents\) at one place: Hyperlink Base and only needs to write the document name (like Letter.doc or any other file on that location) in the Hyperlink Address property.

Let us try that:

  1. Click on the Office Button at the top-left corner and highlight the Manage option to display Database options (Access 2007). In Access 2003 and earlier versions, you will find this option in Tools Menu.

  2. Select Database Properties.

  3. Select the Summary Tab.

  4. Type C:\My Documents\ in the Hyperlink Base control (see the image given above)  and click OK to save it.

  5. Open your Form and remove the C:\My Documents\ text typed in for an earlier example, leaving the Letter.doc file name intact.

  6. Save the Form and click on the label control to open the Word Document.

  7. You may try to open any other document you have in that location, with only the file name changed in the label.

Opening Objects from another Microsoft Access Database.

If you have followed me so far with the above sample exercises, then with a few changes, we can do it.

  1. First, remove the text from the Hyperlink Base control ('C:\My Documents\') and leave the control empty.

  2. Create another Label control on your Form.

  3. Change the Caption Property value to Ext. Database.

  4. Set the Hyperlink Address property value to your external database path, like C:\mdbs\myDatabase.accdb.

  5. Set the Hyperlink SubAddress property value to Report myReport. Change the report name to match yours.

  6. Save the Form with the change.

  7. Open the Form in normal view and click on the label control.

Your external database will open first and will show your report in print preview.

Note: If your database is secured, then it will prompt for User ID and Password. You may try opening other objects: Form, Query, Macro & Table.

Share:

Microsoft Access Tutorial Database

Introduction.

In Microsoft Access 2003 and earlier versions, the Northwind.mdb sample database was automatically installed along with the program. This database served as a valuable resource for beginners, providing a practical environment to explore and practice the features of Microsoft Access.

Users migrating from Microsoft Excel often face challenges when transitioning to Access. Many are accustomed to organizing data in worksheets and simple tables, but these lack the flexibility and power of a true database system. While Excel does provide basic database-like features—such as sorting, searching, and filtering—its capabilities are limited compared to Access. Exploring Excel’s Help documentation on database concepts can be a useful starting point for learning fundamental rules of database design and management. By applying these practices, users can structure their Excel data in ways that make it easier to link or import into Access in the future.

Starting with Microsoft Access 2007, however, the Northwind database was no longer installed by default. Instead, users can create it manually from the available sample templates. The Northwind template includes comprehensive examples and tutorial material, making it an excellent resource for learning and practicing database concepts in Access.

How to Create NorthWind.accdb database.

  1. Open Microsoft Access 2007

    On the New Database screen, you’ll see several database template categories listed on the left panel. By default, the Featuring category is selected. In the main window, the Blank Database template appears at the top, along with other templates designed for specific purposes.

  2. On the left panel, find the Sample Template category and select it.
  3. Click on the Northwind 2007 Template.

    The database will be saved in the active folder by default. You may change the folder by clicking on the folder icon to the right of the database file name.

  4. Click the Create Button to create the sample database in your preferred folder.

Always use the sample database as a reference point when working through issues related to table design, setting up relationships, creating queries, forms, reports, or macros. Try experimenting with trial-and-error practices on the specific task you want to accomplish, using whatever knowledge and ideas you already have. This hands-on approach gives you deeper insight into the design process and, in most cases, helps you arrive at solutions on your own.

If you still cannot resolve the issue, the experience gained through trial and error will make it much easier to explain your problem clearly and seek help from other sources.

Access Users Forums.

You can search this Website for topics that you are interested in, or post your queries and get help from experts in Microsoft Access Users' Forums on the Internet. Links to some of the popular Forum Websites are given below:

  1. http://www.access-programmers.co.uk/forums/
  2. http://www.accessforums.net/#access-forums
  3. http://www.mrexcel.com/forum/microsoft-access/
Share:

Designing About Form for MS-Access Project

Introduction

This is all about the Microsoft Access About Form.

Once your Microsoft Access application development process is complete, you may design a small form called the About Form for your project. The About Form typically displays your project’s logo, name, version number, copyright information, and any other details you wish to include.

Sample About Form image of Windows Live Writer Application is given below as an example:

Designing an Access About Form is straightforward. You will typically need:

  • Two Label controls to display the application name and the current version number.

  • A Textbox to show the copyright information.

  • An Image control (optional) to include your custom logo, giving your application a unique identity.

Designing a Simple Access About Form.

Let us design such a small About Form to know what it takes to create one with a simple Logo. Our sample About Form in design view is given below for reference.

I have designed a simple logo in MS Word, captured a screenshot of it, modified it in MS Paint, and saved it as a .bmp file.@@@

  1. Open your Microsoft Access Application.

  2. Create a new Blank Form.

  3. Set the Width Property value of the Form to 3.93"

  4. Click on the Detail Section of the Form to select it.

  5. Set the Height property value to 1.53".

  6. Insert an Access Image control from the Toolbox on the left side of the Form and select the Project Logo image from your computer. You may select the Picture Property of the Image control and click on the build (...) button to browse and select the logo image from your computer, if you wish to change the image later.

    The Image Properties.

  7. Change the Image property values as given below:

    • Picture Tiling: No

    • Size Mode: Zoom

    • Picture Alignment: Center

    • Picture type: Embedded

  8. Ms-Access Label & Text Controls.

  9. Insert a Label control to the right of the logo and top of the Form, and resize it to make it wide enough to write the Application name in bold letters.

  10. Write the name of your Project in the Caption property, change the font size big enough to your liking, make it bold, and align the text to the center.

  11. Create another Label control below the first one, with the same width as the first label, and write the Version number of your Project, make it bold, and align the text to the center.

  12. Insert a Textbox below the earlier labels, and change its width to be as wide as the top labels.

  13. Copy and paste the following expression into the Control Source property of the textbox. ="Copyright " & Chr$(169) & Year(Date()) & " All Rights Reserved".

  14. Change the following Property values of Text-Box as given below:

    • Border Style: Transparent

    • Text Align: Center

    • Enabled: No

    • Locked: Yes

    • Tab Stop: No


    MS-Access Command Button.

  15. Create a Command Button below the textbox and position it in the center horizontally.

  16. Make the following changes to the Command Button:

    • Change the Name property value to cmdOK.

    • Change the Caption property value to OK.

    • Click on the Event Tab of the property sheet.

    • Select the On Click property and select [Event Procedure] from the drop-down list.

    • Click on the Build (...) button to open the VBA Module with the empty procedure start and end lines.

    • Copy the middle line of the Code given below and paste the line in the middle of the start and end lines of the VBA procedure (Private Sub cmdOK_Click() . . . End Sub). Or copy all three lines and paste them, overwriting the existing lines in the VBA Module.

    • Private Sub cmdOK_Click()
      DoCmd.Close
      End Sub
      

      When the Access User clicks on the Command Button, the above Code will run and the About Form will be closed.

  17. Save the Form and rename it as About or frmAbout.

  18. Open the About Form in normal View and see how it looks on the Access Application Window.

    The Property Value Changes.

    As you can see, the Access About Form needs some changes to make its appearance like a real About Form. Let us do that to give it the final touches.

  19. Make the following changes in the Form's Property Values as shown below:

    • Caption: About <your Project name here>

    • Pop Up: Yes

    • Modal: Yes

    • Default View: Form View

    • Allow Form View: Yes

    • Auto Center: Yes

    • Auto Resize: Yes

    • Fit to Screen: No

    • Border Style: Dialog

    • Record Selectors: No

    • Navigation Buttons: No

    • Dividing Lines: No

    • Scroll Bars: Neither

    • Control Box: Yes

    • Close Button: No

    • Min Max Button: None

  20. Save the Form after the above changes.

    View The Application About Form in Normal View.

  21. Open the About form in Normal View.

    A sample Image of the completed About Form in normal view is given below.

You must add an Option in the Customized Menu of your Project to enable the User to open the Access Application About Form if he/she wish to do so. Alternatively, you may add a Command Button on the Main Form of your Project to do that.

Share:

PRESENTATION: ACCESS USER GROUPS (EUROPE)

Translate

PageRank

Post Feed


Search

Popular Posts

Blog Archive

Powered by Blogger.

Labels

Forms Functions How Tos MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Class Module External Links Queries Array msaccess reports Accesstips WithEvents msaccess tips Downloads Objects Menus and Toolbars Collection Object MsaccessLinks Process Controls Art Work Property msaccess How Tos Combo Boxes Dictionary Object ListView Control Query VBA msaccessQuery Calculation Event Graph Charts ImageList Control List Boxes TreeView Control Command Buttons Controls Data Emails and Alerts Form Custom Functions Custom Wizards DOS Commands Data Type Key Object Reference ms-access functions msaccess functions msaccess graphs msaccess reporttricks Command Button Report msaccess menus msaccessprocess security advanced Access Security Add Auto-Number Field Type Form Instances ImageList Item Macros Menus Nodes RaiseEvent Recordset Top Values Variables Wrapper Classes msaccess email progressmeter Access2007 Copy Excel Export Expression Fields Join Methods Microsoft Numbering System Records Security Split SubForm Table Tables Time Difference Utility WScript Workgroup database function msaccess wizards tutorial Access Emails and Alerts Access Fields Access How Tos Access Mail Merge Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Common Controls Conditional Formatting Data Filtering Database Records Defining Pages Desktop Shortcuts Diagram Disk Dynamic Lookup Error Handler External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Message Box Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Union Query User Users Water-Mark Word automatically commands hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar updating upload vba code