Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Multiuser > List box can't ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 2135 of 2176
Post > Topic >>

List box can't handle large stirngs for a filter.

by "Rocky5" <nospam@[EMAIL PROTECTED] > Jul 9, 2008 at 12:49 PM

I have this code that selects the records to print, however from the string

when I select more than 300 records or so the re****t will not launch, but
it 
will on stand alone for over 2000 records.

The error message I get is : " The filter operation was canceled. The
Filter 
would be too long"


Here is the code. the list box contains the results/ Records I want to 
print. Is there a way around that? waht is the limitation on the filter.

Thanks for your help in advance !
..........................................................................................................................................................................................................................................................
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
   Dim varItem As Variant
   Dim strSelected As String

   strSelected = ""

   For Each varItem In Me.lstInstrIssue.ItemsSelected
       'If the selected item is numeric, uncomment the following line
       strSelected = strSelected & Me.lstInstrIssue.Column(0, varItem) &
","

       'If the selected items are textual, uncomment the following line
       '   strSelected = strSelected & """" & Me.List2.Column(0, varItem)
& 
""","
   Next varItem

   'Get rid of the trailing comma
   'If the selected item is numeric, uncomment the following line
   If Len(strSelected) > 0 Then
      strSelected = "(" & Left(strSelected, Len(strSelected) - 1) & ")"
    Else
msgg:
    MsgBox "You must Select at least one record", vbCritical, "My 
Application"
    GoTo endit
    End If
   'If the selected items are textual, uncomment the following line
   '   strSelected = "(" & Left(strSelected, Len(strSelected) - 2) & """)"
   If Len(strSelected) < 0 Then
   GoTo msgg
   Else
   End If

    Debug.Print strSelected
   'MsgBox "You Selected Record(s) Number " & strSelected

   DoCmd.OpenRe****t "C2 Profibus Loop", acViewPreview, , "CMPNT_ID IN " & 
strSelected
endit:
Exit_Command10_Click:
    Exit Sub

Err_Command10_Click:
    MsgBox Err.Description
    Resume Exit_Command10_Click

End Sub
 




 4 Posts in Topic:
List box can't handle large stirngs for a filter.
"Rocky5" <no  2008-07-09 12:49:10 
Re: List box can't handle large stirngs for a filter.
"Douglas J. Steele&q  2008-07-09 13:31:45 
Re: List box can't handle large stirngs for a filter.
"pietlinden@[EMAIL P  2008-07-09 11:09:50 
Re: List box can't handle large stirngs for a filter.
<david@[EMAIL PROTECTE  2008-07-10 08:37:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 10:49:25 CST 2008.