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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Up A File to View, Edit, Modify and Search a Database

Status
Not open for further replies.

WebGodiva

Technical User
Jun 21, 2000
263
US
I have an application built that allows the user to go through the records in a database by using arrows for (back) (next) (beginning)(end) and then buttons for add and edit and this application works fine.

When you use the add button it opens a blank form, when you use the edit button it opens the form filled in with the record you are on. Which is great.

What I need is a way to also on this same form allow the user to search for a specific record by date or name and then use the edit button.

Currently I have three files, the entry form, the action form and the results form.

Any help would be appreciated.
 
Is either of these fields the primary key to the table?? You can only allow selecting a unique record to edit if you select the primary key (otherwise there may be multiple matches to your search).

Assuming the field Name is the primary key, then have a select list of distinct names from the table (using <cfquery...> and <cfselect...>) and pass the ID through to the edit form on a form submit action. Select the correct record from the database and display that record.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top