Private Sub cmdToday_Click()
Dim oConn as new ADODB.connection
Dim oRs as new ADODB.recordset
Dim sql as string
sql = "SELECT WORD,MEANING FROM TODAY_LIST"
oConn.Open "Provider=SQLOLEDB.1;Password=config;User ID=sa;Initial Catalog=master;Data Source=GAATLMDV01PSGE;Persist Security Info=True"
Set oRs = oConn.Execute(sql)
mfgViewData.Cols = 2
mfgViewData.TextMatrix(0, 0) = "WORD"
mfgViewData.TextMatrix(0, 1) = "MEANING"
mfgViewData.ColWidth(0) = 1500
mfgViewData.ColWidth(1) = 3000
With oRs
Do While oRs.EOF = False
mfgViewData.AddItem ""
mfgViewData.TextMatrix(mfgViewData.Rows - 2, 0) = .Fields("WORD")
mfgViewData.TextMatrix(mfgViewData.Rows - 2, 1) = .Fields("MEANING")
.MoveNext
Loop
End With
Set oRs = Nothing
oConn.Close
End Sub
am tring to display access-2007 Data in MSHFLexgrid-vb 6.0
but most of the data is not getting displayed, please can anyone help me how to adjust column width during runtime, so the whole data is visible. Please can anybody help me in this regards.
Access DB looks like this which has 2 columns WORD, MEANING.
WORD
Acquaintanc:
MEANING
Somebody known: somebody who is known slightly rather than intimately; Knowledge: knowledge, usually slight, of somebody or something