mde 文件中的按钮出现问题:列表框 .rowsource
我有一个表单,其中有一个列表框和几个为列表框运行 sqk 语句的按钮。
sub on_onClick()
' error checking
me.listbox.rowsource = "SELECT tblMain.First, tblMain.last FROM tblMain ORDER BY tblMain.Last;"
所以这就是我用于列表框的东西。它在 .mdb 中对我来说工作得很好,在我转换数据库、拆分它、制作 .mde 之后,我进入 mde,它对我来说仍然工作得很好。它被放置在共享驱动器上
,但是,任何其他尝试使用它的人,所有按钮都不起作用。无法判断它们是否没有工作,或者 VBA 没有为它们返回任何结果。它对我有用,但对他们不起作用。所以...这是我本地 LAN 团队的,我认为他们都有完全控制权限???单击使他们进入该表单的按钮也运行良好。
请帮忙!
I have a form that has a list box and several buttons that run sqk statements for the list box.
sub on_onClick()
' error checking
me.listbox.rowsource = "SELECT tblMain.First, tblMain.last FROM tblMain ORDER BY tblMain.Last;"
so this kinda thing is what I use for the list box. it works fine for me in the .mdb, and after i have converted the database, split it, made the .mde I go into the mde and it works fine for me still. This is placed on a shared drive
HOWEVER, anyone else that tries to use this, none of the buttons are having an effect. Can't tell if they are not working, or the VBA is not returning any results for them. It works for me, but it is not working for them. So...this is for my local LAN team, I think they all have full control permissions??? The button clicks that get them to that form are working fine also.
please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想到了一些事情:
从您的问题中不清楚 mde 文件本身是否位于共享驱动器上,或者后端数据库是否位于共享驱动器上并且每个用户都有 mde 文件的副本在他们的电脑上。如果用户在网络共享上使用相同的 mde 文件,那么我强烈建议不要采用这种方法。 (这可能不是问题的原因,但它会给您带来麻烦。)为每个用户提供 mde(前端)的副本,并使应用程序指向网络上的后端数据库
确保 mde 能够将表重新链接到后端 mdb 文件。如果您搜索 SO,您可能会找到如何在代码中执行此操作的示例。
我怀疑您可能遇到了 mde 文件无法找到后端表的问题。在这种情况下,当您设置列表框的行源时,您不会在 VBA 代码中收到错误消息,并且看起来好像什么也没有发生。
A couple of things come to mind:
It is not clear from your question whether the mde file itself is on a shared drive or whether the back-end database is on the shared drive and each user has a copy of the mde file on their PC. If the users are using the same mde file on the network share then I would strongly suggest not taking this approach. (It probably isn't the cause of the issue, but it will get you into trouble down the road.) Give each user a copy of the mde (front end) and have the application point to the back-end database on the network share.
Make sure that the mde has the ability to relink the tables to the back-end mdb file.If you search SO you'll probably find examples of how to do this in code.
I suspect you may be running into an issue where the mde file is not able to find the back-end tables. In this case you won't receive an error message in your VBA code when you're setting the listbox's rowsource and it will appear as though nothing is happening.
他们是否禁用了宏安全性?默认情况下,Access 中启用了 MACro 安全性,并且您的任何 VBA 代码都不会运行。要禁用:打开Access,工具->宏->安全性并设置为低。
Do they have Macro security disabled? By default, MAcro security is enabled in Access and none of your VBA code will run. To disable: open Access, Tools -> Macro -> Security and set to low.
我认为通常最好使用自我认证的项目或安全位置,而不是更改安全级别。
有关宏安全性的一些信息:
自我认证项目
有关 Office 代码和宏安全的安全主体的一般信息
Office 的默认受信任位置2003
宏安全在 Office 2003 中
I think it is generally best to use self-certified projects or a secure location rather than change security levels.
Some information on macro security:
Self Certify projects
General information on security principals for Office code and macro security
Trusted location defaults for Office 2003
Macro security in Office 2003