# Re: Selection.Formula再问

Posted by indian on March 03, 1999 at 15:56:49:

In Reply to: Re: Selection.Formula再问 posted by SuBird on March 02, 1999 at 11:41:06:

Subird桑
你的方法我先前就试过了,可是还是不行,以下是我的一个button的程式,我想试过很多变数的写法如: ' " & name & " ' " 或 " & Name & " " 等方法都没有办法直选取出资料,不知道是不是selectionFormula它的语法太笨了?还请帮忙一下...拜托拜托...熬三四天啦.......

Private Sub Command2_Click()
Dim Name As String
Name = Combo3.Text
CrystalReport1.SelectionFormula = "{Activity Hours.Name} = ' " & Name & " ' "
CrystalReport1.ReportFileName = App.Path + "\engineer.rpt"
CrystalReport1.Action = 1
End Sub

Follow Ups:

- Re: Selection.Formula再问 SuBird 08:25:19 3/04/99 (0)