MS-Access / Getting Started

Choosing Web Field Names

Access 2010 gives you lots of flexibility when it comes to naming your web fields. A web field name can be up to 64 characters long, can include any combination of letters, numbers, spaces, and special characters except a period (.), exclamation point (!), square brackets ([]), leading space, leading equal sign (=), or nonprintable character such as a carriage return. The name also cannot contain any of the following characters: / \ : ; * ? "" < > | # <TAB> { } % ~ &. In general, you should give your fields meaningful names and should use the same name throughout for a field that occurs in more than one table. You should avoid using field names that might also match any name internal to Access or Microsoft Visual Basic. For example, all objects have a Name property, so it's a good idea to qualify a field containing a name by calling it VendorName or CompanyName. You should also avoid names that are the same as built-in functions, such as Date, Time, Now, or Space. See Access Help for a list of all the built-in function names.

Although you can use spaces within your field names in a web database, you should try to create field names without embedded spaces. Many Structured Query Language (SQL) databases to which Access can link (notably Oracle and Ingres) do not support spaces within names. Although Microsoft SQL Server does allow spaces in names, you must enclose such names in brackets or use quotes and execute a Set Quoted Identifier On command. If you ever want to move your web application to a client/server environment and store your data in an SQL database such as SQL Server or Oracle, you'll most likely have to change any names in your web database tables that have an embedded space character. Table field names propagate into the queries, forms, and reports that you design using these tables. So any name you decide to change later in a table must also be changed in all your queries, forms, and reports.

If you use reserved words or function names for web field names, Access 2010 catches most of these and displays a warning message. This message warns you that the field name you chose, such as Name or Date, is a reserved word and you could encounter errors when referring to that field in other areas of the database application. Access still allows you to use this name if you choose, but take note of the problems it could cause. To avoid potential conflicts, we recommend you avoid using reserved words and builtin functions for web field names.

[Previous] [Contents] [Next]