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

Auto Complete in Data Grid 1

Status
Not open for further replies.

nickwoj

Programmer
Jun 29, 2001
3
US
I have an application that uses an Ado data control to populate a data grid from a database. It allows the user to view and add new records to the database. I was wondering if anyone knows how to auto complete some of the fields in the data grid in order to cut down on the repetition of entering data. The main fields I would want to auto complete are the current year and a talk number which is the same thoroughout the records returned. Any ideas? Thanks
 
Why not just set default values for the fields in the backend database tables? Then the values will show as a new record is generated.
 
The problem is that I'm using a combo box that generates an SQL query to populate the grid and that is why all the talk number fields are the same(the query selects all that are a certain number). Also, the database stores data up to three years old, so I can't set a default value for these fields. I was hoping there's a way to code my app so when the user clicks to add a new record, the talk number(constant throughout) and the year(present) are already there. Thanks for the help.
 
I have found that if you fill in the fields you want to 'autocomplete' in the grid_onaddnew() routine it works for me.

I hope this helps!

Shannon
 
Shannon,
Thanks for the tip. It was exactly what I was looking for. It works exactly the way I want it to. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top