Results 1 to 4 of 4

Thread: data control to display only certain records

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    i have a subroutine that prompts the user for a case number; if they type in 000000 i need all the cases w/ 000000 to show up in the form and the user can click the arrow on the databound control to go through only the records with a case number of 000000

    also how could i show all these records using a grid; i need a number they input to pull up a grid w/ all the records relating to that inputted number; like the 000000. So every case number w/ 000000 would appear in the grid. It needs to be exchangeable though depending on what number is entered by the user.

    Need serious help!!!!

    Thanks

  2. #2
    New Member
    Join Date
    Jan 1999
    Location
    Shawnee Mission, KS
    Posts
    14
    Add this line of text to the "criteria" line in your query.
    [Select number]. This will ask for the number each time the query is run. It will produce only those records. You can view the query instead of a form or report and it will show all the records that met the criteria.
    You can activate it by using a button that call opening the query.

    Hope this helps.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    I am not sure i understand. the query would be based on what the user inputs into a input box.

    whatever the case number is; i need to find all records relating to that case.

    Help!!!

    can you give specific code on how to do this?

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Will this help

    you may change the recordsource statement on every user input as below:

    Data1.RecordSource = "SELECT <Your Field Name> FROM <Your Table Name> WHERE <Your Field Name>=<User Input Value>;"
    Data1.Refresh

Posting Permissions

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



Click Here to Expand Forum to Full Width