Microsoft Access Database and its Query Using Global Variable

Published: 06th May 2010
Views: N/A

Microsoft Access Database supports the making of queries that can be linked to external data sources through the use of ODBC connections on the local computer. This enables users to interact with data stored outside the Microsoft Access database without using linked Tables. The Pass-Through is another queries are written using the Structured Query language (SQL) syntax supported by the external data source. Microsoft Access Database also offers the ability for programmers to create Database driven web applications by help of the programming language. Access databases offer a Query Designer, a graphical user interface that allows users to create queries without knowledge of the SQL programming language.

Besides query application of Microsoft Access Databases you are going to learn how to select data in one form and open another form with more data related to the field you just selected by taking advantage of global variables in the query design form. To help get this, you will use a global variable entered in the criteria of a field while creating the query in the Microsoft Access Databasequery design form. The result is a powerful user interface function that allows a user to look up more data, or enter more data related to a selected record. Users can use it to look up pricing histories, addresses, inventory locations, really anything where you would have more data about a key field in your database.

You can achieve this by learning to use global variables. These variables can be accessed by any form, query, macro, or other modules while you are in the Access session. Use a module to store these variables in.

There are several simple steps to achieve this functionality of Global Variable

  1. Create a global variable in a module
  2. Create your data table.
  3. Create the source query for the look up or pop up form
  4. Create the pop up form with the source query as the data source
  5. Create the form to enter the selection from and enter the VBA code to the pertinent control events on the form to open the look up form.

Report this article Ask About This Article

More to Explore