I put the records in a database with access to LynxGrid Type mismatch error, can you see help my code wrong ?
Code:Private Sub Form_Load() Dim lRow As Integer 'set list columns With listEntries .Redraw = False .AddColumn "ID Code", 50 '0 .AddColumn "Full Name", 150 '1 .AddColumn "Adress", 260 '2 .AddColumn "Telephone", 70 '3 .Redraw = True .Refresh End With strSQL = "SELECT Tabstaff .IDCode, Tabstaff .FullName, Tabstaff .Adress, Tabstaff .Telephone FROM Tabstaff ;" rsstaff .Open strSQL, DataCustomers, adOpenKeyset, adLockOptimistic rsstaff .MoveFirst listEntries.Redraw = False listEntries.Clear While Not rsstaff .EOF With listEntries lRow = .ItemCount .AddItem .CellText(lRow, 0) = rsstaff !IDCode ' This was the type mismatch error, if this line is rem by single quotes, then the next line will error .CellText(lRow, 1) = rsstaff !Fullname .CellText(lRow, 2) = rsstaff !Adress .CellText(lRow, 3) = rsstaff !Telephone End With rsstaff .MoveNext Wend listEntries.Redraw = True listEntries.Refresh rsstaff .Close End Sub


Reply With Quote



Bookmarks