Results 1 to 4 of 4

Thread: Lists Search

  1. #1
    Join Date
    Mar 2002

    Unanswered: Lists Search

    Hi, I have a list and when users select from the list, it give them the result. Currently I have the following code when the result is a popup in another form but I would like it to popup in the same form where the list box is located. Can someone help me and what am I doing wrong. Thanks.

    Private Sub lstEvents_DblClick(Cancel As Integer)

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim varitm As Variant

    stDocName = "frmEventLists"

    For Each varitm In lstEvents.ItemsSelected
    stLinkCriteria = "[Event Name]=" & "'" & lstEvents.ItemData(varitm) _
    & "' or " & stLinkCriteria
    Next varitm

    stLinkCriteria = Left(stLinkCriteria, Len(stLinkCriteria) - 3)

    'MsgBox stLinkCriteria

    DoCmd.OpenForm stDocName, , , stLinkCriteria


    Exit Sub

    MsgBox Err.Description
    'MsgBox "Please Select an Event from the List", vbExclamation
    Resume Exit_cmdOpenSelected_Click

    End Sub

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    How about editing the filter for the current form, then calling me.requery? Does that kind of get you where you want to go?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Mar 2002
    Sorry I want the result to show in a subfrm that is unbound in the form where the list is.

  4. #4
    Join Date
    Mar 2002
    Nevermind. Thanks I will used the requery method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts