MS访问中命令按钮的表达式构建器

发布于 2025-01-26 05:10:36 字数 161 浏览 2 评论 0 原文

我是MS Access的新手,想使用表格的按钮。我想了解一个要点,

表格中有一个按钮

我有一个文本框搜索,并且我不想使用VBA的

,并且在Expression Builder的帮助下,我可以在单击按钮后清除文本框中的文本吗?我已经尝试过,但没有解决。是正确的方式吗?

I am new to MS Access and would like to work with buttons of a form. I wanted to understand a point

I have a text box search and I have a button in the form

I don't want to use VBA and with the help of Expression Builder can I clear the Text in Text Box search after clicking the button?

I have tried and it isn't working out. Is it the right way ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你穿错了嫁妆 2025-02-02 05:10:36

使用Expression Builder,您只能调用用户功能,宏或VBA例程。
尝试使用VBA代码:

Me.controlName.value = ""

me 是您的形式。

ControlName 是您的字段名称(在我的 txt_somefield “)

单击按钮,事件,onclick并放置此代码(请记住要替换字段的名称)。

With expression builder you can only call a user function, macro or vba routine.
Try with vba code:

Me.controlName.value = ""

Me is your form.

controlName is the name of your field (in my Screenshot is "txt_somefield")

Click on button, Event, Onclick and put this code (remember to replace your field's name).

我要还你自由 2025-02-02 05:10:36

不知道为什么要使用表达式构建器。一个简单的宏将可以解决问题。

选择属性命令按钮的 everts 选择 ... 上,单击,然后宏Builder

添加操作,选择您的文本框控件名称,选择设置属性,然后 value - 并留下空白

保存和出口跑步

Not sure why you want to use Expression Builder. A simple macro will do the trick.

Select Properties of Command Button, under Events choose ... next to On Clickand then Macro Builder

Add Action, choose your TextBox control name, select Set Property, then Value - and leave Value blank

Set Property Macro

Save and Exit and Run

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文