Professional Web Applications Themes

search results output in form - Microsoft Access

I have successfully created a form with a text box (txtLastName) and command button to execute a search. The command button executes a sub routine which opens a connection to the database and executes a query using the value from the text box: "SELECT LastName FROM Contacts WHERE LastName LIKE """ & Me.txtLastName & "*""" I would now like to output all matching records in a list. Ideally this list will appear in the same form, below the text box and command button. By default, I don't want anything to appear in the list area until a search has been ...

  1. #1

    Default search results output in form

    I have successfully created a form with a text box (txtLastName) and command
    button to execute a search. The command button executes a sub routine which
    opens a connection to the database and executes a query using the value from
    the text box:

    "SELECT LastName FROM Contacts WHERE LastName LIKE """ & Me.txtLastName &
    "*"""

    I would now like to output all matching records in a list. Ideally this list
    will appear in the same form, below the text box and command button. By
    default, I don't want anything to appear in the list area until a search has
    been executed. If a subsequent search is executed, the existing list will
    clear and the new results will be displayed.

    How can this be accomplished?

    Thanks,
    Han


    Han Guest

  2. #2

    Default search results output in form

    Hello.

    Create a list box where you want the search results, and
    set the RowSource to this query:

    PARAMETER txtLastName TEXT; SELECT LastName FROM Contacts
    WHERE LastName LIKE [txtLastName] & "*";


    Then make the commandbutton call something like:

    ResultList.Requery


    Regards,
    Ivar Svendsen.
    Ivar Guest

  3. Moderated Post

    Default Re: search results output in form

    Removed by Administrator
    Emilia Guest
    Moderated Post

Similar Threads

  1. Display search results from Flash Form to CFGrid
    By dpinder123 in forum Coldfusion Flash Integration
    Replies: 19
    Last Post: September 27th, 01:40 AM
  2. Search results
    By Bskyweb in forum Coldfusion Database Access
    Replies: 3
    Last Post: July 16th, 07:52 PM
  3. Sending search results to a results page..with asp
    By dan.how in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 26th, 04:18 PM
  4. Help with search results in asp vbs
    By Chris in forum Dreamweaver AppDev
    Replies: 2
    Last Post: February 17th, 09:57 PM
  5. Search within Search Results
    By Maria Kovacs in forum ASP Database
    Replies: 1
    Last Post: October 7th, 04:45 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139