Академический Документы
Профессиональный Документы
Культура Документы
You can use Access 2010 and Access Services, a new component of SharePoint, to build web
database applications. This helps you:
Overview
Access Services provides a platform for you to create databases that you can use on the
Web. You design and publish a web database by using Access 2010 and SharePoint, and
people use the web database in a Web browser.
HOW IT WORKS
When you publish a web database, Access Services creates a SharePoint site that contains
the database. All of the database objects and data move to SharePoint lists in that site.
After you publish, SharePoint visitors can use your database, based on their permissions for
the SharePoint site.
Full Control This lets you make data and design changes.
Contribute This lets you make data changes, but not design changes.
Read This lets you read data, but you can't change anything.
You can open the web database in Access, revise the design, and then sync your changes
effectively, save them to the SharePoint site. You can also take it offline, use the offline
version, and then sync data and design changes when you are back online.
NOTE
To build a web database, you need Full Control permissions on the SharePoint site
where you want to publish it. For more information about SharePoint permissions, see
the See Also section.
The Navigation Pane (the feature that you use in Access to browse the objects in a
This section describes key new features and provides steps for the basic design tasks you
need to complete to create a web database.
Determine the purpose of your database Have a clear plan so you can make
good decisions when working out design details.
Find and organize the information required You cannot use linked tables in a
web database. Any data that you want to use that will not originate in the database must be
imported before you publish. If you line up your data before you start designing, you can
avoid having to refit your design to accommodate unexpected data challenges.
Identify the SharePoint site you will use to publish You cannot publish at all
without SharePoint. If you want to test your design in a browser while you design it (not a
bad idea), you have to publish it first.
Plan your security You can take advantage of SharePoint security to control
access to your web database. Plan security early so you can build it into your design.
Design differences between desktop and web databases
Some database features that you can use in a desktop database are not available with
Access Services. However, there are new features that support many of the same scenarios
as these desktop features.
The following table lists the desktop-only features, and the new feature that helps support
the same scenario.
SCENARIO
DESKTOP-ONLY
FEATURE
NEW FEATURE
Design view
Group functions
Programming events
VBA
Navigation Pane;
switchboards
IMPORTANT
You can create many client objects in a web database, but you cannot use
them in a browser. However, they are part of the web database and can be used in Access
2010 on the desktop. People can open the web database in Access, and then use the client
objects. This is an effective way to share a database, and also opens new opportunities for
working together over the Web. SharePoint handles any concurrency issues.
Desktop-only features with no Access Services counterpart
NOTE
Union queries
Crosstab queries
Table relationships
Conditional formatting
The File tab opens Backstage view, a new part of the Access interface where you'll find
commands that apply to an entire database, such as Publish to SharePoint.
In Backstage view, the New tab has commands for creating a database.
When you first create a blank web database, Access creates a new table and opens it in
Datasheet view. You can use the commands on the Fields tab and the Table tab to add fields,
indexes, validation rules, and data macros a new feature that lets you change data based
on events.
After you edit and use the new table, you'll most likely want to create more tables.
Create a new web table
With your web database open:
On the Fields tab, in the Add & Delete group, click the field type that you want.
3.
1.
Select the field that has formatting and properties that you want to change.
2.
3.
Use the commands in the Formatting and Properties groups to change the
settings.
ADD A CALCULATED FIELD
You can add a field that displays a value that is calculated from other data in the same table.
Data from other tables cannot be used as the source for the calculated data. Some
expressions are not supported by calculated fields.
1.
2.
Point to Calculated Field, and then click the data type that you want for the field.
The Expression Builder opens.
3.
Use the Expression Builder to create the calculation for the field. Remember that you
can only use other fields from the same table as data sources for the calculation. For Help
using the Expression Builder, see the article Use the Expression Builder.
SET UP DATA VALIDATION RULES
You can use an expression to validate input for most fields. You can also use an expression to
validate input for a table, which can be useful if you want to validate input for a field that
does not support validation, or if you want to validate field input based on the value of other
fields in the table.
You can also specify the message that is displayed when a validation rule prevents input,
known as a validation message.
1.
2.
3.
In the Field Validation group, click Validation, and then click Field Validation
Rule.
The Expression Builder opens.
4.
Use the Expression Builder to create your validation rule. For Help using the
Expression Builder, see the article Use the Expression Builder.
5.
In the Field Validation group, click Validation, and then click Field Validation
Message.
6.
Type the message that you want to display when input data is not valid, and then
click OK.
2.
3.
In the Field Validation group, click Validation, and then click Record Validation
Rule.
The Expression Builder opens.
4.
Use the Expression Builder to create your validation rule. For Help using the
Expression Builder, see the article Use the Expression Builder.
5.
In the Field Validation group, click Validation, and then click Record Validation
Message.
6.
Type the message that you want to display when input data is not valid, and then
click OK.
CREATE A RELATIONSHIP BETWEEN TWO WEB TABLES
To create a relationship in a web database, you use the lookup wizard to create a lookup
field. The lookup field goes in the table that is on the many- side of the relationship, and
points to the table that is on the one- side of the relationship.
Click the arrow next to Click to Add, and then click Lookup & Relationship.
3.
Follow the steps of the Lookup Wizard to create the lookup field.
3.
This procedure uses the charitable contributions template as an example. You can
follow along if you create a new database by using the charitable contributions database
template.
1.
2.
3.
Create any required joins by dragging fields from one object to another in the query
design window.
In this example, drag the ID field from Constituents to the DonorConstituentID field in
Donations, and then drag the DonorConstituentID field from Donations to the
ConstituentID field in EventAttendees.
4.
Add the fields that you want to use. You can drag the fields to the grid, or you can
double-click a field to add it.
In this example, add Event from the table Events, DonationDate from the table
Donations, and Greeting, FirstName, and LastName from the table Constituents.
5.
In this example, you want to limit DonationDate so that it falls between the StartDate
and EndDate of the event. In the query design grid, in the Criteriarow under
DonationDate, type >=[StartDate] And <=[EndDate].
CREATE A WEB FORM
Forms are the main way to enter and edit data in your web database, and are also useful for
reviewing data. Forms run in the browser, helping optimize performance. When you open a
form, your browser retrieves the required data from the SharePoint server. You can filter and
sort the data in the form without having to retrieve data from the server again.
TIP
For best performance, limit the records retrieved by your main forms and reports.
1.
2.
On the Create tab, in the Forms group, click one of the following buttons:
Form Create a simple form that shows one record at a time, using the object
you selected as a data source.
NOTE
Datasheet Create a form that looks and behaves like a datasheet, using the object
you selected as a data source.
NOTE
For best performance, limit the records retrieved by your main forms and reports.
1.
2.
On the Create tab, in the Reports group, click one of the following buttons:
Report Create a basic report using the object you selected as a data source.
You might want to wait until last to create your Navigation form, so that that you can
add all your objects to the form when you create it.
1.
2.
In the Forms group, click Navigation, and then select a navigation layout from the
list.
3.
To add an item, drag it from the Navigation Pane to the Navigation control.
NOTE
4.
Add any other controls that you want to the body of the Navigation form. For
example, you might want to provide search functionality across all forms by adding some
controls to your Navigation form.
2.
1.
Under Application Options, click Web Display Form, and then select the form that
you want from the list.
NOTE
You do not have to select your navigation form as the web display form. You can
Before you publish a web database, consider running the Compatibility Checker. The
Compatibility Checker examines the database objects for issues that would prevent them
from publishing correctly. If no issues emerge, the Compatibility Checker reports that the
database is Web-compatible. If problems are discovered, the Compatibility Checker creates a
table that lists the issues.
1.
2.
On the File tab, click Save & Publish, and then click Publish to Access Services.
2.
In the Server URL box, type the Web address of the SharePoint server where
you want to publish the database. For example, http://Contoso/.
In the Site Name box, type a name for your web database. This name will be
appended to the Server URL to produce the URL for your application.
For example, if the Server URL is http://Contoso/ and the Site Name is CustomerService, the
URL is http://Contoso/CustomerService.
3.
2.