PDA

Click to See Complete Forum and Search --> : Datagrid not reporting the correct record.


JasonS
Jun 12th, 2000, 10:15 PM
I'm using a datagrid (VB6) to display records from an Access table that was populated with a SQL statement.

I placed a "edit" button on the form that would bring up the record details in a separate form however the data is always from record 1.

Here's the sql that I used to populate the Ado control on the edit form.

sSQL = "Select * from Questions where QuestionGroup = '" & frmQuesEntryNew.AdoQues.Recordset("QuestionGroup") _
& "' and QuestionId = '" & frmQuesEntryNew.AdoQues.Recordset("QuestionId") & "'"

frmQuesEntryNew is the parent form which contains the grid.
I've also tried .Underlyingdata but it also shows the data from record 1.

Why doesn't the grid control return which record is currently selected?

Thanks.