Troubleshooting

graphics/troubleshooting.gif

Query Expressions Fail to Execute

When attempting to execute a query that contains an expression, a "Can't evaluate expression" or "Wrong data type" message box appears.

The "Can't evaluate expression" message usually indicates a typographic error in naming a function or an object. Depending on the use of the function, an Enter Parameter Value dialog might appear if the named object does not exist. The "Wrong data type" message is most likely to occur as a result of attempting to use mathematic or trigonometric operators with values of the Text or Date/Time field data types. If your expression refers to a control contained in a form or report, the form or report must be open when you execute the function.

Aggregate Queries Throw Errors

I receive a "You tried to execute a query that does not include the specified expression 'ExpressionName' as part of an aggregate function" message when I attempt to run my aggregate query.

An aggregate function is missing from the Totals row of one of the columns. You must select Group By, Expression, or an aggregate function such as Sum, Avg, Min, Max, or Where for each column of your query. For T-SQL Queries, the da Vinci toolset's "ADO Error: Column 'dbo.TableName.ColumnName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause" error message is more explicit.

Two-Digit Years Turn into Four Digits in Query Criteria

When I type Between #1/1/03# and #12/31/03# in the Criteria cell of Query Design view, Access changes my entry to Between #1/1/2003# and #12/31/2003#.

Windows XP and 2000 and the Office applications that run under these operating systems are year 2000 (Y2K) compliant. By default, earlier versions of Access running under Windows 9x and Me drop the century digits when creating Jet SQL statements to execute queries, regardless of the formatting applied to the underlying table mm-ddd-yyyy for all date fields in Northwind.mdb. Windows XP and 2000 define the short date format as having four-digit years. It's a good data entry practice to require typing four-digit years by adding the appropriate input mask (99/99/0000) with the Input Mask Wizard.



Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net