Pallex
Feb 1st, 2000, 12:06 AM
Hi! I`m a newbie (at VB) here - dont hurt me!
I`m getting the hang of things, but i have a little problem.
I have a form where i display a few fields from each record in the database (its the only table).
I read the position that the user selected via :
frmName.Variable = AdodcControlName.Recordset.AbsolutePosition
I was then using this number in the following way, to get the record out :
rsRecordSetName.Move Variable - 1, adBookmarkFirst
Which seemed to work when i had 2 records in my table, but now i have 3 i can see that its not working. This is probably because the ordering of the records in the database is different to the order on the datagrid that is used to choose the record.
I need a way to map the datagrid choice onto the relevant record. I`ve thought of using another sql command to `find` the record. But that seems a little clumsy, and i`m no SQL expert anyway. What is the *correct* way to do this?
Thanks in advance,
Alex.
I`m getting the hang of things, but i have a little problem.
I have a form where i display a few fields from each record in the database (its the only table).
I read the position that the user selected via :
frmName.Variable = AdodcControlName.Recordset.AbsolutePosition
I was then using this number in the following way, to get the record out :
rsRecordSetName.Move Variable - 1, adBookmarkFirst
Which seemed to work when i had 2 records in my table, but now i have 3 i can see that its not working. This is probably because the ordering of the records in the database is different to the order on the datagrid that is used to choose the record.
I need a way to map the datagrid choice onto the relevant record. I`ve thought of using another sql command to `find` the record. But that seems a little clumsy, and i`m no SQL expert anyway. What is the *correct* way to do this?
Thanks in advance,
Alex.