Share this Page URL

Chapter 14. Understanding Access Project... > Working with Views and Stored Proced... - Pg. 529

Understanding Access Projects 529 Working with Views and Stored Procedures A SQL Server database uses database objects known as views and stored procedures to select records and to perform other database operations that queries perform in a standard Access data- base. Views are similar to select queries. (In the Database window for an Access project, a view is identified with the same icon that's used to identify a select query.) Stored procedures are equivalent to action queries. The queries that are listed in the Database window for an Access project are linked to SQL Server views and stored procedures. Views A view is similar to an Access select query in that it retrieves records from one or more tables. In a view, you can apply a filter or selection criteria to define the records that the view displays. In a standard Access database, you can define parameters in a select query, but you can't include a parameter in an Access project view. You can, however, define a parameter in a stored procedure, as you'll see later in this chapter. You can also summarize data in a view (as you can a select query), and you can update data in a view. See Also For more information about parameter queries in an Access database, see Chapter 6, "Sorting, Filtering, and Retrieving Data." Here are the steps to follow to create a view in an Access project. Create an Access project view 1. 2. In the Database window, click Queries in the Objects list, and then Double-click Create View In Designer. In the Add Table dialog box, select MarketingCampaigns and Tasks, click Add, and then click Close. As you can see here, the window you use to create a view is similar to the standard Access Query window. The area at the top of the window displays the tables included in the view. The bottom portion of the window displays a grid that you use to define which fields the view in- cludes, designate which fields will be shown in the view's results, set up a sorting order, and define selection criteria.