Docmd.openform问题 [英] Docmd.openform Problem

查看:183
本文介绍了Docmd.openform问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


在任务的加载事件中表单我有代码

展开 | 选择 | Wrap | 行号

解决方案

从之前删除逗号(,) SQL中的WHERE子句。这告诉SQL将单词WHERE及其后面的所有内容视为另一个记录源。


感谢您的回复!这几天我离开了,很抱歉花了这么长时间才回答。



这是我的拼写错误,在where子句之前没有逗号。您还有其他建议吗?


在此处发布任何代码时请:

  1. 确保您有选项显式设置(请参阅需要变量声明)。
  2. 尝试编译它。如果它因任何原因无法编译,请清楚地解释 - 包括错误消息以及它出现在您的代码行中。编译从Visual Basic编辑器菜单 - 调试 \ 编译项目 (其中项目是实际名称)完成您的项目)。
  3. 从项目中复制代码(使用剪贴板 - 剪切 / 复制 / 粘贴)直接进入你的帖子。键入代码不受欢迎,因为它可能会引入错别字,导致成员浪费不必要的时间。
  4. 确保帖子中的代码包含在CODE标记内(有关详细信息,请参阅 BB代码列表)。发布页面中的哈希(#)按钮有助于此。只需选择您的代码并单击哈希按钮即可自动包围它。

如果涵盖所有这些要点,那么所有成员将能够更好地理解并因此尝试回答您的问题。


Hi!

On load event of "tasks" form I have code

Expand|Select|Wrap|Line Numbers

解决方案

Remove the comma (,) from before the WHERE clause in the SQL. This tells SQL to treat the word WHERE, and all that follows it, as another record source.


Thanks for reply! I was away this days, so sorry it took so long to answer.


That was my spelling mistake, there is no comma before the where clause. Do you have any other suggestion?


When posting any code on here please :

  1. Ensure you have Option Explicit set (See Require Variable Declaration).
  2. Try to compile it. If it doesn''t compile for any reason please explain that clearly - including the error message and which line of your code it appears on. Compilation is done from the Visual Basic Editor menu - Debug \ Compile Project (Where Project is the actual name of your project).
  3. Copy your code (using the Clipboard - Cut / Copy / Paste) from your project directly into your post. Typing in code is not appreciated as it is likely to introduce typos which cause members to waste their time unnecessarily.
  4. Ensure that the code in your post is enveloped within CODE tags (For more on this see BB Code List). The hash (#) button in the posting page helps with this. Simply select your code and click on the hash button to have it enveloped automatically.

If all these points are covered then all members will be better able to understand, and therefore attempt to answer, your question.


这篇关于Docmd.openform问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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