Creating Web macros
In addition to creating tables, queries, forms, and reports in your Web database, you can also automate tasks in your application through macros. The list of macros available in a Web database is smaller than the list available in a client database. (See Table-1.)
Table-1 Macros Available in a Web DatabaseMacro Action
Comment MessageBox RunMenuCommand Group OnError SaveRecord If OpenForm SetFilter Submacro OpenReport SetLocalVar BrowseTo RefreshRecord SetOrderBy ClearMacroError RemoveAllTempVars SetProperty CloseWindow RemoveTempVar SetTempVar DeleteRecord Requery StopAllMacros GoToControl RunDataMacro StopMacro GoToRecord RunMacro UndoRecord
Converting client databases to Web databases
If you already have a database and want to put that data out there on the Web using SharePoint, the good news is, you don't have to start over. The bad news is, it will probably take some additional effort to sort through any Web-compatible issues.
To check an object in a client database to see if it's Web-compatible, right-click the object in the Navigation pane, and then select Check Web Compatibility from the pop-up menu. If the object is Web-compatible, you'll get a message saying everything's A-Okay. If the object is not Web-compatible, Access tells you that and creates a table called Web Compatibility Issues for you to see what the problems are.
Some examples of Web compatibility issues are
- The Column data type is incompatible with the Web.
- Tables with lookups must have a primary key, and the DataType property of the primary key must be Long.
- The Column data type for a value list must be Text to be compatible with the Web.
- Lookup row sources must be complete SQL statements that specify one table and fields from that table to be compatible with the Web.
- The Column data type is incompatible with the Web.
- Access was unable to convert the query for use on the Web because it relies on a different query that is not Web compatible.
If your client database contains lots of objects and you don't have the time to check each one individually, you can check the compatibility of all the objects at once. Click File → Save & Publish, select Publish to Access Services, and then click Run Compatibility Checker in the Check Web Compatibility section on the right side of the screen.
After the compatibility checker runs - which could take some time on large databases - the screen will indicate if the database is compatible or incompatible with the Web. You can click the Web Compatibility Issues button or open the Web Compatibility Issue table from the Navigation pane.
After you repair any issues found with your client database, you can publish it to the SharePoint server, which is covered in the next section.
Creating a Web database is nearly identical to creating a client database. Just start with your baseline of Web tables and build your forms, reports, queries, and macros to be Web compatible - and you'll be ready to publish your database to a SharePoint server.