给你一个简单的例子,在工具/添加过程中,添加名字为STRSQL的属性,然后加入下列代码,这个FORM就有了一个新属性STRSQL,在其他的窗体也可以写:FRMHELP.STRSQL="SELECT ..."。
GOOD LUCK!
*************************************
Option Explicit
Public dong As string
Public Property Get strsql() As string
strsql = dong
End Property
Public Property Let strsql(ByVal vNewValue As strsql)
dong = vNewValue
End Property
Private Sub Command1_Click()
Me.strsql = "select ..."
End Sub
Private Sub Command2_Click()
Me.Caption = Me.strsql
End Sub