vb6.0企业版+win2000(求帮助)
问题1、如何把窗体form1中的dim sgm as string,sgm=text1.text的内容赋给DataReport中的LABEL1.caption(或text1.text),以便打印出来。
问题2、把窗体form1中的变量 dim sq as string ,sq=text1.text,如何在dataenvironment1中的 sql=select * from table where dj.wjdm=de.wjdm and wjdm="'+sq+'"双重查询中运用?我的做法错在哪里?
问题1、如何把窗体form1中的dim sgm as string,sgm=text1.text的内容赋给DataReport中的LABEL1.caption(或text1.text),以便打印出来。
问题2、把窗体form1中的变量 dim sq as string ,sq=text1.text,如何在dataenvironment1中的 sql=select * from table where dj.wjdm=de.wjdm and wjdm="'+sq+'"双重查询中运用?我的做法错在哪里?
Private Sub Command1_Click()
Dim sgm As String
sgm = Text1.Text
label1.Caption = sgm
DataReport1.Show
End Sub结果出错了!
第二个问题好象也不行,去掉and wjdm="'& sq &'"后就可以了显示了
变量应在form1 中定义?还是在datareport1定义并赋值的,在datareport1是如何定义并赋值的呢?