Office中国论坛/Access中国论坛

标题: 請問報表的輸入參數(InputParameters)這一屬性用VBA怎麼寫? [打印本页]

作者: lzx-shmily    时间: 2010-4-23 11:08
标题: 請問報表的輸入參數(InputParameters)這一屬性用VBA怎麼寫?
我用屬性表是這樣的:
@Cust_no varchar(6)=forms![報表表單]![text11],@Shipdate SMALLDATETIME=forms![報表表單]![text4]
我想問一下在報表的VBA中怎麼寫?在哪個對象的事件中寫?謝謝!
Private Sub Report_Open(Cancel As Integer)
    Me.InputParameters = "@Cust_no varchar(6)='" & Forms![報表表單]![Text11] & "',@Shipdate SMALLDATETIME='" & Forms![報表表單]![Text4] & "'"
End Sub
我這樣寫的話,不行
作者: yodong    时间: 2010-4-24 21:59
你试下:
Me.InputParameters ="" 或nulll
Me.InputParameters = "@Cust_no varchar(6)='" & Forms![報表表單]![Text11] & "',@Shipdate SMALLDATETIME='" & Forms![報表表單]![Text4] & "'"
作者: xin54237    时间: 2010-5-4 13:56
感谢楼主!!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3