
Formula Error - URGNET, PLEASE HELP.....
I suppose EmpID.ID is defined like a string in your database, if this is
the case you maybe want this:
IDStr = "{EmpID.ID} >= '" & FromID
IDStr = IDStr & "' AND "
ToID = Str(RptQuery.Text2.Text)
IDStr = IDStr & "{EmpID.ID} <= '" & ToID & "'"
but maybe you wont get the desired results, maybe you want to convert the
value of database to numeric value instead with built in functions of CR
..
--
Alberto Borbolla
Tecnologia en Sistemas
MEXICO
Replace "X" to send mail
Quote:
> Hi,
> There are two USRE INPUT fields as FromID, ToID (an inquiry for
> Employees' IDs in a certain range. ie From: 1234 To: 1550)
> I have this code in VB5.0 for CR6.0 Pro.
> Dim FromID as string 'List IDs From
> Dim ToID as string 'List IDs up to
> Dim IDStr as string
> FromID = Str(ReportQuery.Text1.Text)
> IDStr = "{EmpID.ID} >= " & FromID
> IDStr = IDStr & " AND "
> ToID = Str(RptQuery.Text2.Text)
> IDStr = IDStr & "{EmpID.ID} <= '" & ToID & "'"
> .
> .
> .
> CrystalsReport1.DataFiles(0) = "C:\BUDGET\BUDGET.MDB"
> CrystalsReport1.SelectionFormula = IDStr
> .
> .
> .
> THEN I GOT THE FOLLOWING MESSAGE:
> ERROR IN FORMULA < Record_Selection>
> '{EmpID.ID} >= 1234 AND {EmpID.ID <= 1550'
> A string is required here
> MANY THANKS!
> Oga