|
-
Feb 21st, 2001, 09:41 AM
#1
Thread Starter
New Member
Dear All
I was wondering whether anyone could help.
How come when I hard code in the selection formula it works fine but when I build the selection formula via a string it fails to launch the Crystal report window and work.
I have checked the string and it gives the EXACT syntax as the hard coding. Still it doesn't work.
I am at a loss as to why it doesn't work - Suggestions please.
Below is an example of my code. The string is built on the contents of a list box. Code is best viewed in 'Courier font' as I'm sure you'll already know.
Dim frmcount As Integer
Dim frmloop As Integer
Dim result As String
frmcount = List1.ListCount - 1
result = Chr(34) & "{query.lot_number}='"
For frmloop = 0 To frmcount
result = result & List1.List(frmloop) & "'"
If frmloop <> frmcount Then result = result & " or {query.lot_number}='"
Next frmloop
result = result & Chr(34)
RecallReport.SelectionFormula = result
RecallReport.PrintReport
Cheers
Stewart
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|