Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to show SQL Results so User can pick 1

Status
Not open for further replies.

BitCounter

Programmer
Feb 18, 2000
28
US
What is the best way to output the results of an SQL query so that my user can then select the one needed? For example, say I am attempting to output a report for a single record from my database. To generate the query, my user types in a string for Last Name. Based on that string, I generate a recordset (SQL) [using the "LIKE" to include all records with similar last names]. I can generate the recordset just fine. What's the best method for outputting this recordset back to the user so that they can then select the exact record they want to print?
 
Bitcounter,<br>
You probably want to keep this concise and simple? Just set up a listbox with a couple of columns--however many you have in the SQL (shouldn't be more than whatever the user needs to decide which record he wants to print) and fill the listbox with the results by setting the listboxe's RowSource = the SQL. Then in the double click event, get the Key field column and use it to filter and open the report.<br>
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top