PDA

Click to See Complete Forum and Search --> : data control to display only certain records


Bebe
Mar 21st, 2000, 01:50 AM
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

Mildumar
Mar 21st, 2000, 02:38 AM
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.

Bebe
Mar 21st, 2000, 03:52 AM
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?

Chris
Mar 21st, 2000, 01:49 PM
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 :)