运行时错误3141 - 从2003年到2010年的访问转换 [英] Run-time error 3141 - Access Conversion from 2003 to 2010

查看:113
本文介绍了运行时错误3141 - 从2003年到2010年的访问转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被困在同一个sql语句中的时间太长了,我要把手放在空中然后走开了。我只是在学习这个数据库的东西。这个原始数据库是2003年,我将它转换为2010年。没有什么对我有用。例如,我正在尝试查看报告并且我一直收到错误消息:SELECT语句包含一个保留字或拼写错误或缺失的参数,或者标点符号不正确。我进入了模块和调试,我已经被困在这里几周了。

I''ve been stuck on this same sql statement for way too long and I''m about to throw my hands in the air and walk away. I''m just learning this database stuff. This original database was 2003 and I converted it to 2010. Nothing is working for me. For example, I''m trying to view a report and I keep receiving an error message: The SELECT statement includes a reserved word or an argument that is misspelled or missing, or the punctuation is incorrect. I got to the module and debug and I''ve been stuck here for weeks.

展开 | 选择 | Wrap | 行号

推荐答案

告诉你的是你在第36 ...... 40行的字符串格式错误


插入
What is is telling you is that your string on line 36...40 is malformed

Insert a
展开 | 选择 | Wrap | 行号


我现在可以告诉你,我发现了一个错过的双引号和AS [TIME]。时间是一个保留的标记。


仍然是sql_criteria;但是,你应该看看这些信息:


-命名字段,表格和文件时最好的做法是避免使用除字母数字字符和下划线之外的任何内容(虽然允许空间从编程的角度来看是有问题的并且最好避免)并且避免所有保留的单词和标记是非常重要的:
访问2007保留字和符号
AllenBrowne- Access中的问题名称和保留字
I can tell you right now that I''ve found one missed double quote and "AS [TIME]" Time is a reserved token.

Still reveiwing sql_criteria; however, you should take a look at this information:

-It is best practice when naming fields, tables, and files to avoid the use of anything other than alphanumeric characters and the underscore (spaces although allowed are problematic from a programing point of view and best avoided) and it is VERY importaint to avoid all reserved words and tokens:
Access 2007 reserved words and symbols
AllenBrowne- Problem names and reserved words in Access


参考 故障排除部分:
>发布前(VBA或SQL)代码


取消注释:选项比较数据库

添加:选项显式

想想我修正了下面的拼写错误。我仍然建议 debug.print sql_criteria 检查已解析的字符串。


我还建议按照上面的故障排除说明进行操作链接。当编译器在找到的第一行错误上停止时,您可能需要多次重复编译步骤。

Refering to the trouble shooting section of:
> Before Posting (VBA or SQL) Code

Uncomment:Option Compare Database
Add:Option Explicit
Think I fixed the typo in the following. I still hightly advise the debug.print sql_criteria to check the resolved string.

I also recommend following the troubleshooting instructions in the above link. You may have to repeat the compile step several times as the compiler stops on the first line of error found.

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于运行时错误3141 - 从2003年到2010年的访问转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆