Does anyone know why I would get a run-time error 91 when using a MSFlexgrid. "Object Variable or with block variable not set.
heres my code below.
This code will work fine with a datagrid and a MSHFlexgrid
but not a MSFlexGrid. when I hit debug it highlites the .OPEN strRs, strCn
strRs = "SELECT wrkordno, orgdate, orgname, dept, status FROM WRKORD WHERE status = 'OPEN'"
Set rs = New ADODB.Recordset
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Open strRs, strCn
Set MSFlexGrid1.DataSource = rs
rs.MoveFirst
rccount = rs.RecordCount
lblOpenWO.Caption = rccount
Thanks DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
heres my code below.
This code will work fine with a datagrid and a MSHFlexgrid
but not a MSFlexGrid. when I hit debug it highlites the .OPEN strRs, strCn
strRs = "SELECT wrkordno, orgdate, orgname, dept, status FROM WRKORD WHERE status = 'OPEN'"
Set rs = New ADODB.Recordset
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Open strRs, strCn
Set MSFlexGrid1.DataSource = rs
rs.MoveFirst
rccount = rs.RecordCount
lblOpenWO.Caption = rccount
Thanks DVannoy
A+,Network+,CNA
dvannoy@onyxes.com