listview - Arguments not optional in vb6 -
why getting error? code right why?
private sub loademployee() frmemployee.lvemployee.listitems call connect 'sql = "select * tblemployee " rs.open "select * tblemployee ", conn, adopendynamic, adlockoptimistic if not rs.eof rs.movelast set item = lvemployee.listitems.add(1, , rs!id) item.subitems(2) = rs!firstname 'item.subitems(2) = rs!middlename item.subitems(3) = rs!lastname item.subitems(4) = rs!agename item.subitems(5) = rs!gender item.subitems(6) = rs!address item.subitems(7) = rs!datehired item.subitems(8) = rs!birthdate item.subitems(9) = rs!birthplace item.subitems(10) = rs!citizenship item.subitems(11) = rs!cellno item.subitems(12) = rs!status item.subitems(13) = rs!basicsalary item.subitems(14) = rs!designation item.subitems(15) = rs!department 'item.subitems(16) = rs!m_name 'item.subitems(17) = rs!m_occupation 'item.subitems(18) = rs!n_spouse 'item.subitems(19) = rs!dependents 'item.subitems(20) = rs!sss 'item.subitems(21) = rs!philhealth 'item.subitems(22) = rs!pagibig item.ensurevisible end if rs.close conn.close set conn = nothing end end sub
error:
arguments not optional
really having hard time this. error when calling.i called this:
private sub form_load() loademployee end sub
how fix this?
did declare item
?
try declaring:
dim item listitems
Comments
Post a Comment