Am using a datagrid for display. When clicking the row, I want to fill three textboxes with data from the three columns; col1, col2, col3. The problem is that the first click on the datagrid fills the textboxes with the data from row 1. the second click fills the boxes with the data from the previous box. If a double click is used, the correct data is filled into the text boxes.

I am using a sql to open the database and select the fields: sSql = "SELECT fld1, fld2, fld3 from tblmine WHERE fld1 = '" & datagrid1.text * "'". This is in the datagrid's _click sub.

How to have the textboxes filled on the first click?

Any help is appreciated.