Displaying Columns in a DataGrid
I tried searching in this forum for a solution to my problem and I didn't have much luck. Can someone please help me in my program?
I have a table called Transaction_Detail, it has several fields but I do not wish to display all of them. I do not wish to display the SSN but I will need it later on when they update the record in the DataGrid.
Is there a way to do this?
Below is a a snipet of my code.
Private Sub cmdDisplayRecord_Click()
Set rsTransaction_Detail = New ADODB.Recordset
mysql = "SELECT SSN,Tran_ID, Tran_Seq_ID as [Seq No], Tran_Date as [Tran Date], Beg_Balance_Amt as [Beginning Balance] FROM Transaction_Detail WHERE SSN = " & CDbl(txtSSN.Text)
rsTransaction_Detail.CursorLocation = adUseClient
rsTransaction_Detail.CursorType = adOpenDynamic
rsTransaction_Detail.LockType = adLockOptimistic
rsTransaction_Detail.Open mysql, adoBenConn
Set Adodc1.Recordset = rsTransaction_Detail
Label1.Caption = Adodc1.Recordset.Fields.Count
Set rsTransaction_Detail.ActiveConnection = Nothing
Call pInitializeGrid
'Label1.Caption = CStr(rsTransaction_Detail.RecordCount)
End Sub
Thanks
|