Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    35

    Unanswered: Problem with list box

    HY: I modify a code that find in one page. I create a listBox in a form that contain the list of all the record that have my table "Information" I need that when I select one record in this list and click over this or over the button Show Record , open a form SL Data Entry with the information of this record. The problem is that when I open the form appear an error: The OpenForm action was canceled.


    How I can resolve these?

    The code is:


    Private Sub ShowRecord_Click()
    'Find a selected record, then close the search dialog box

    DoCmd.OpenForm "SL Data Entry", , , _
    "[Information.Number]=" & "'" & Me.lstSearch.Column(7) & "'"

    'Close the dialog box
    DoCmd.Close acForm, "prueba"

    End Sub

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    is Information.Number a number?

    If so, remove the single quotes:

    "[Information.Number]=" & Me.lstSearch.Column(7)
    oh yeah... documentation... I have heard of that.

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

Posting Permissions

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