在其他形式的查询中使用主形式的按钮标题 [英] use caption of pressed button from main form in query of other form

查看:71
本文介绍了在其他形式的查询中使用主形式的按钮标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是:

主窗体具有9个命令按钮和连续子窗体.单击某个按钮可打开另一个表格,该表格带有用于输入数量的文本框和两个命令按钮.当单击第一个按钮时,我想使用主表单中按下按钮的标题进行查询.如何获得该按钮标题?

Main form has 9 command buttons and continuous subform. Click on some button open other form with text box for entering quantity and two command buttons. When click on the first button I want to use caption of pressed button from main form for query. How to get that button caption?

谢谢.

推荐答案

您刚刚单击了按钮,就知道了控件的名称,所以我不太明白这个问题,除了听起来很像好主意.

You have just clicked the button, you know the name of the control, so I do not quite see the problem, other than that it all sounds like quite a bad idea.

Private Sub cmdClickMe_Click()
Debug.Print Me.cmdClickMe.Caption
Debug.Print Screen.ActiveControl.Caption
End Sub

这篇关于在其他形式的查询中使用主形式的按钮标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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