错误3828 - 无法使用IN子句引用具有多值字段的表... [英] Error 3828 - cannot reference a table with a multi-valued field using an IN clause...

查看:138
本文介绍了错误3828 - 无法使用IN子句引用具有多值字段的表...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Access 2007.我创建了一个查询,我在代码中使用该查询来创建电子表格。查询运行没有任何问题,并给出了正确的结果。

当我将查询输出到Excel电子表格时,它工作正常(参见附加代码中的选项1)。当我尝试将结果输出到CSV时文件,我得到3828错误代码(显示在附件中)(参见附件中的选项2)。


我的目标是将信息输出到CSV文件,然后将CSV文件导入带有Excel宏的Excel模板。这样我呈现给客户的文件将根据自己的喜好进行格式化。


这两个实例中都运行完全相同的查询。一个有效,另一个没有。我尝试删除规范文件,我仍然得到错误。


任何人都可以帮忙解决这个问题吗?


谢谢。


Ed Torasso

展开 | 选择 | Wrap | 行号

解决方案

多值字段是Microsoft试图屏蔽最终用户与真实数据库的对象规范化...以及表级别的查找字段。

恕我直言:除非您要发布到sharepoint站点,否则不应该使用它们。没有其他数据库支持这些字段,事实上,微软几乎没有任何优雅处理Access之外的这些字段...


现在尝试解决您的问题,我们需要要查看查询的SQL,请指明哪个字段是您的多值字段。请单击帖子工具栏中的 [CODE /] 按钮,然后在 [code] [/ code] 标记之间剪切并粘贴SQL脚本。

感谢您的回复。这是为我的查询生成的SQL。我没有将任何字段定义为多值。这是我的主要问题。

展开 | 选择 < span class =codeDivider> | Wrap | 行号


重新格式化中的第2行和第12行。

你有"#"和()在AS中字段名。


giggles删除所有这些符号,让我知道会发生什么。

([客户#] ==> [Customer_No])

([电子邮件地址(TO)] ==> [电子邮件地址_TO])

等......


I am running Access 2007. I have created a query that I use in my code for the creation of a spreadsheet. The query runs without any problems and gives the proper results.

When I output the query to an Excel spreadsheet it works fine (see option 1 in attached code). When I attempt to output the results to a "CSV" file, I get the 3828 error code (shown in attachment) (see option 2 in attached code).

My goal is to output the information to a CSV file then import the CSV file into an Excel template with an Excel macro. This way the file I present to the customer will be formatted to their liking.

This is running the exact same query in both instances. One works and the other does not. I tried removing the specification file and I still get the error.

Can anyone help in resolving this issue?

Thanks.

Ed Torasso

Expand|Select|Wrap|Line Numbers

解决方案

Multivalue fields are Microsoft''s attempt to shield the enduser from real database normalization... along with the lookup fields at table level.
IMHO: Neither should be used unless you are going to publish to a sharepoint site. No other database supports these fields, and in fact, Microsoft barely handles these fields outside of Access with any grace...

Now to attempt to solve your issue, we''ll need to see the SQL for your query and please indicate which field is your multivalue field. Please, click on the [CODE/] button in the post toolbar and then cut and paste your SQL script between the [code] [/code] tags.


Thanks for your response. Here is the SQL that was generated for my query. I do not have any of the fields defined as multi-value. That is my main issue.

Expand|Select|Wrap|Line Numbers


Line 2 and Line 12 in the reformatting.
You have "#" and "()" in the "AS" field names.

for giggles remove ALL of these symbols and let me know what happens.
( [Customer #] ==> [Customer_No] )
( [Email Address (TO)] ==> [Email Address_TO] )
etc...


这篇关于错误3828 - 无法使用IN子句引用具有多值字段的表...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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