Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: RE: DataGrid, OnRow_DblClick()


Message #1 by "Prajapati, Vibha" <VPrajapati@i...> on Fri, 29 Sep 2000 12:30:05 -0400
Hi Guys:

Sorry for the trouble.  But i solved the problem.  Thanks for all your help.

Thank you,

Vibha

-----Original Message-----
From: Vibha Prajapati [mailto:vprajapati@i...]
Sent: Friday, September 29, 2000 9:13 AM
To: professional vb
Subject: [pro_vb] DataGrid, OnRow_DblClick()


Hi,

VB Front End:

Form with all the text control to display the distinct record from the
System Table.

DataGrid Control:
Displays all the records for the particular distinct record on the form.

Example:  System table can have duplicate record for e.g SSN.
          Query: Select Distinct field from System

Text box on the form will display only one occurence of the duplicate
record using the distinct query.

DataGrid Control will Display all the records for that particular SSN.

When i double click a row in the datagrid, the text box on the form should
be filled with the value of the row clicked.

Code:
'THIS FUNCTION IS CALLED IF THERE ARE ANY DUPLICATE RECORD
'EXAMPLE: IF SSN 111-11-1111 HAS MORE THAN 1 RECORD, THEN DATAGRID IS 
VISIBLE
Private Sub DataGrid_Action()
      Set rsDataG = New ADODB.Recordset
      Set rsDataG = objServer.Get_Match_DG(mskSSN)
      
      If rsDataG.RecordCount > 1 Then
        Set DataGrid1.DataSource = rsDataG
        DataGrid1.Visible = True
      Else
        DataGrid1.Visible = False
      End If
End Sub

'ALL I AM TRYING TO DO IS IF THE USER CLICKS ANY ROW IN DATAGRID, THE FORM
SHOULD BE FILLED WITH THE ROW.

HOPE I AM CLEAR IN EXPLAINING THIS.

THANK YOU,

VIBHA


  Return to Index