如何选取表单或报表属性描述文本 [英] How to pick up a Form or Reports Property Description text

查看:62
本文介绍了如何选取表单或报表属性描述文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一种方法来获取在vba中的Forms属性的描述框中输入的值。我的意思是当右键单击一个表单并选择属性并将后续文本输入到描述框中时的属性..


这可能听起来像是一件奇怪的事情,但是我们这样做的原因是,当我们修改表单(以及顺便报告)时,我们使用属性的描述框输入版本号,以便我们可以从主数据库窗口中看到表单的当前版本号。我们想要做的是获取该版本号并在表单打开时将其显示在表单上,​​以便我们在向用户报告错误时确认用户具有正确的表单版本号。这是因为我们遇到了用户制作数据库副本并将其保存到桌面而不是使用快捷方式的问题(即使我们不断解释为什么他们不应该这样做,也是一个持续存在的问题!)


所以回顾一下,当表单打开时,我们希望能够从其属性中选取Description文本,并将其用作表单上的简单标签。


我没有问题,当我拥有它时使用该值,但我无法弄清楚如何在vba中获得这个值。


任何想法都会感激不尽。


John

I''m trying to find a way to pick up the values entered into the description box of a Forms property in vba. By that I mean the property when a form is right clicked and property selected and the subsequent text entered into the Description box..

This may sound like an odd thing to be doing but the reason we are doing this is that when we modify forms (and reports by the way) we use the Description box of Properties to enter a version number so that we can see from the main database window, the current version number of the form. What we would like to do, is pick up that version number and display it on the form when it is open so we can confirm that users have the correct form version number when reporting errors to us. This is because we have a problem with users making copies of the database and saving them to their desktop instead of using shortcuts (its an ongoing problem even though we keep explaining why they should not do this!)

So to recap, when a form opens we would like to be able to pick up the Description text from its Properties and use this as a simple label on the form.

I have no problem utilising the value when I have it but I cannot figure out how to get to this value in vba.

Any ideas would be gratefully received.

John

推荐答案

我有一种可怕的感觉我之前找到了这个,但我现在找不到它。这样的事情应该是非常直观地找到并使用它总是让我感到恼火。


欢迎来到 Bytes
I''ve a horrible feeling I''ve found this one before, but I can''t find it now. It''s always irritated me that such things should be so counter-intuitive to find and use.

Welcome to Bytes!


我尝试在很多地方寻找变量......但是抱歉,没有运气。


为了防止用户运行本地版本,你可以做(​​不是防弹的)
I tried looking for the variable in ALOT of places...but sorry, no luck.

To prevent users running local versions, you could do (not bulletproof)
展开 | 选择 | Wrap | 行号


这将是我的方法太过笑脸。为什么在编写可以在多个数据库中使用的VBA例程时过于复杂?
That would be my approach too Smiley. Why overcomplicate when you can write a VBA routine you can use in multiple databases?


这篇关于如何选取表单或报表属性描述文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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