• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Troubleshooting

Query Expressions Fail to Execute

Q1:When attempting to execute a query that contains an expression, a “Can't evaluate expression” or “Wrong data type” message box appears.
A1: 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 object, the form or report must be open when you execute the function.

Four-Digit Years Turn into Two Digits in Query Criteria

Q1:When I typeBetween #1/1/1997# and #12/31/1997# in the Criteria cell of Query Design view, Access changes my entry to Between #1/1/97# and #12/31/97#, which isn't Y2K-compliant.
A1: By default, Access drops 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. The problem doesn't occur with Windows 2000+, which defines the short date format as having four-digit years.

You solve this Y2K compliance problem by choosing Tools, Options, clicking the General tab, and marking the This Database check box in the Use Four-Digit Year Formatting frame. If you want to make all your databases Y2K-compliant, mark the All Databases check box, too.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint