Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: Zooming into a single record from Datagrid

200| Tue, 06 May 2008 16:44:00 GMT| jm7| Comments (0)
I am using a Datagrid with ADO code bindings.

To go to a single record view I use the following code when I click on a
particular row in the datagrid:

Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

recposition = adoPrimaryRS.AbsolutePosition

and then when the Single record FORM is loaded, I sue the following code to
get to that record in the Datagrid:

Private Sub form_activate()
On Error GoTo GoFirstError

adoPrimaryRS.Move recposition - 1

This works well but it looks like a pretty primitive method. Is there
another property that I can use to select a particular record?

Thanks,

John

Keywords & Tags: zooming, single, record, datagrid, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/560803/
 
«« Prev - Next »» 0 helpful answers below.

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories