空当然不匹配了
用isnull判断一下
查了一些资料:top不是access的保留字段,access的保留字段如下:Microsoft Access 版本:1.0 ,
1.1 , 2.0
Microsoft Access for Windows 95, version 7.0
Microsoft Access 97
本片文章中所列的单词和符号是保留字,应避免在Access字段名和变量名中使用,因为这些保留字
在
Access和Microsoft Jet database系统中有其特定的含义,如果你使用,将会出错。
-A
ADD
ALL (2.0, 7.0, 97)
Alphanumeric
ALTER
AND
ANY (2.0, 7.0, 97)
Application
AS
ASC
Assistant
AUTOINCREMENT
Avg
-B
BETWEEN
BINARY
BIT
BOOLEAN
BY
BYTE
-C
CHAR, CHARACTER
COLUMN
CompactDatabase (2.0, 7.0, 97)
CONSTRAINT
Container (2.0, 7.0, 97)
Count
COUNTER (2.0, 7.0, 97)
CREATE
CreateDatabase (2.0, 7.0, 97)
CreateField (2.0, 7.0, 97)
CreateGroup (2.0, 7.0, 97)
CreateIndex (2.0, 7.0, 97)
CreateObject (2.0, 7.0, 97)
CreateProperty (2.0, 7.0, 97)
CreateRelation (2.0, 7.0, 97)
CreateTableDef (2.0, 7.0, 97)
CreateUser (2.0, 7.0, 97)
CreateWorkspace (2.0, 7.0, 97)
CURRENCY
CurrentUser (2.0, 7.0, 97)
-D
DATABASE (2.0, 7.0, 97)
DATE (2.0, 7.0, 97)
DATETIME
DELETE
DESC
Description
DISALLOW
DISTINCT
DISTINCTROW
Document (2.0, 7.0, 97)
DOUBLE (2.0, 7.0, 97)
DROP
-E
Echo (2.0, 7.0, 97)
Else
End
Eqv
Error
EXISTS (2.0, 7.0, 97)
Exit
-F
FALSE
Field, Fields (2.0, 7.0, 97)
FillCache (2.0, 7.0, 97)
FLOAT, FLOAT4, FLOAT8
FOREIGN (2.0, 7.0, 97)
Form, Forms
FROM
Full (2.0, 7.0, 97)
FUNCTION
-G
GENERAL
GetObject (2.0, 7.0, 97)
GetOption (2.0, 7.0, 97)
GotoPage
GROUP (2.0, 7.0, 97)
GROUP BY
GUID (7.0, 97)
-H
HAVING
-I
Idle (2.0, 7.0, 97)
IEEEDOUBLE, IEEESINGLE
If
IGNORE (2.0, 7.0, 97)
Imp
IN, In
INDEX
Index, Indexes (2.0, 7.0, 97)
INNER
INSERT
InsertText (2.0, 7.0, 97)
INT, INTEGER, INTEGER1, INTEGER2, INTEGER4
INTO
IS, Is
-J
JOIN
-K
KEY (2.0, 7.0, 97)
-L
LEFT
Level
Like
LOGICAL, LOGICAL1
LONG, LONGBINARY, LONGTEXT
-M
Macro
Match (2.0, 7.0, 97)
Max, Min, Mod
MEMO
Module
MONEY
Move (2.0, 7.0, 97)
-N
NAME (2.0, 7.0, 97)
NewPassword (2.0, 7.0, 97)
NO
Not
NULL
NUMBER, NUMERIC
-O
Object (2.0, 7.0, 97)
OLEOBJECT (2.0, 7.0, 97)
OFF
ON
OpenRecordset (2.0, 7.0, 97)
OPTION
OR, Or
ORDER
Outer (2.0, 7.0, 97)
OWNERACCESS
-P
Parameter (2.0, 7.0, 97)
PARAMETERS
Partial (2.0, 7.0, 97)
PERCENT (2.0, 7.0, 97)
PIVOT
PRIMARY
PROCEDURE
Property (2.0, 7.0, 97)
-Q
Queries
Query
Quit (2.0, 7.0, 97)
-R
REAL
Recalc (2.0, 7.0, 97)
Recordset (2.0, 7.0, 97)
REFERENCES
Refresh
RefreshLink (2.0, 7.0, 97)
RegisterDatabase (2.0, 7.0, 97)
Relation (2.0, 7.0, 97)
Repaint (2.0, 7.0, 97)
RepairDatabase (2.0, 7.0, 97)
Report
Reports
Requery
RIGHT
-S
SCREEN
SECTION
SELECT (2.0, 7.0, 97)
SET
SetFocus (2.0, 7.0, 97)
SetOption (2.0, 7.0, 97)
SHORT
SINGLE (2.0, 7.0, 97)
SMALLINT (2.0, 7.0, 97)
SOME (2.0, 7.0, 97)
SQL
StDev, StDevP
STRING
Sum
-T
TABLE
TableDef, TableDefs (2.0, 7.0, 97)
TableID
TEXT
TIME, TIMESTAMP (2.0, 7.0, 97)
TOP (2.0, 7.0, 97)
TRANSFORM
TRUE
Type
-U
UNION
UNIQUE
UPDATE
-V
VALUE
VALUES (2.0, 7.0, 97)
Var, VarP
VARBINARY, VARCHAR (2.0, 7.0, 97)
-W
WHERE
WITH
Workspace (2.0, 7.0, 97)
-X
Xor
-Y
Year
YES
YESNO (2.0, 7.0, 97)
下面的符号不能在字段的设计中使用
. / * : ! # & -
查了一些资料:top不是access的保留字段,access的保留字段如下:Microsoft Access 版本:1.0 ,
1.1 , 2.0
Microsoft Access for Windows 95, version 7.0
Microsoft Access 97
本片文章中所列的单词和符号是保留字,应避免在Access字段名和变量名中使用,因为这些保留字
在
Access和Microsoft Jet database系统中有其特定的含义,如果你使用,将会出错。
-A
ADD
ALL (2.0, 7.0, 97)
Alphanumeric
ALTER
AND
ANY (2.0, 7.0, 97)
Application
AS
ASC
Assistant
AUTOINCREMENT
Avg
-B
BETWEEN
BINARY
BIT
BOOLEAN
BY
BYTE
-C
CHAR, CHARACTER
COLUMN
CompactDatabase (2.0, 7.0, 97)
CONSTRAINT
Container (2.0, 7.0, 97)
Count
COUNTER (2.0, 7.0, 97)
CREATE
CreateDatabase (2.0, 7.0, 97)
CreateField (2.0, 7.0, 97)
CreateGroup (2.0, 7.0, 97)
CreateIndex (2.0, 7.0, 97)
CreateObject (2.0, 7.0, 97)
CreateProperty (2.0, 7.0, 97)
CreateRelation (2.0, 7.0, 97)
CreateTableDef (2.0, 7.0, 97)
CreateUser (2.0, 7.0, 97)
CreateWorkspace (2.0, 7.0, 97)
CURRENCY
CurrentUser (2.0, 7.0, 97)
-D
DATABASE (2.0, 7.0, 97)
DATE (2.0, 7.0, 97)
DATETIME
DELETE
DESC
Description
DISALLOW
DISTINCT
DISTINCTROW
Document (2.0, 7.0, 97)
DOUBLE (2.0, 7.0, 97)
DROP
-E
Echo (2.0, 7.0, 97)
Else
End
Eqv
Error
EXISTS (2.0, 7.0, 97)
Exit
-F
FALSE
Field, Fields (2.0, 7.0, 97)
FillCache (2.0, 7.0, 97)
FLOAT, FLOAT4, FLOAT8
FOREIGN (2.0, 7.0, 97)
Form, Forms
FROM
Full (2.0, 7.0, 97)
FUNCTION
-G
GENERAL
GetObject (2.0, 7.0, 97)
GetOption (2.0, 7.0, 97)
GotoPage
GROUP (2.0, 7.0, 97)
GROUP BY
GUID (7.0, 97)
-H
HAVING
-I
Idle (2.0, 7.0, 97)
IEEEDOUBLE, IEEESINGLE
If
IGNORE (2.0, 7.0, 97)
Imp
IN, In
INDEX
Index, Indexes (2.0, 7.0, 97)
INNER
INSERT
InsertText (2.0, 7.0, 97)
INT, INTEGER, INTEGER1, INTEGER2, INTEGER4
INTO
IS, Is
-J
JOIN
-K
KEY (2.0, 7.0, 97)
-L
LEFT
Level
Like
LOGICAL, LOGICAL1
LONG, LONGBINARY, LONGTEXT
-M
Macro
Match (2.0, 7.0, 97)
Max, Min, Mod
MEMO
Module
MONEY
Move (2.0, 7.0, 97)
-N
NAME (2.0, 7.0, 97)
NewPassword (2.0, 7.0, 97)
NO
Not
NULL
NUMBER, NUMERIC
-O
Object (2.0, 7.0, 97)
OLEOBJECT (2.0, 7.0, 97)
OFF
ON
OpenRecordset (2.0, 7.0, 97)
OPTION
OR, Or
ORDER
Outer (2.0, 7.0, 97)
OWNERACCESS
-P
Parameter (2.0, 7.0, 97)
PARAMETERS
Partial (2.0, 7.0, 97)
PERCENT (2.0, 7.0, 97)
PIVOT
PRIMARY
PROCEDURE
Property (2.0, 7.0, 97)
-Q
Queries
Query
Quit (2.0, 7.0, 97)
-R
REAL
Recalc (2.0, 7.0, 97)
Recordset (2.0, 7.0, 97)
REFERENCES
Refresh
RefreshLink (2.0, 7.0, 97)
RegisterDatabase (2.0, 7.0, 97)
Relation (2.0, 7.0, 97)
Repaint (2.0, 7.0, 97)
RepairDatabase (2.0, 7.0, 97)
Report
Reports
Requery
RIGHT
-S
SCREEN
SECTION
SELECT (2.0, 7.0, 97)
SET
SetFocus (2.0, 7.0, 97)
SetOption (2.0, 7.0, 97)
SHORT
SINGLE (2.0, 7.0, 97)
SMALLINT (2.0, 7.0, 97)
SOME (2.0, 7.0, 97)
SQL
StDev, StDevP
STRING
Sum
-T
TABLE
TableDef, TableDefs (2.0, 7.0, 97)
TableID
TEXT
TIME, TIMESTAMP (2.0, 7.0, 97)
TOP (2.0, 7.0, 97)
TRANSFORM
TRUE
Type
-U
UNION
UNIQUE
UPDATE
-V
VALUE
VALUES (2.0, 7.0, 97)
Var, VarP
VARBINARY, VARCHAR (2.0, 7.0, 97)
-W
WHERE
WITH
Workspace (2.0, 7.0, 97)
-X
Xor
-Y
Year
YES
YESNO (2.0, 7.0, 97)
下面的符号不能在字段的设计中使用
. / * : ! # & -
换个名字试一下
TOP是SQL语句的保留字吧