0

Hi Everybody
I am making a software for my business
I have easily connected my access database to add new records in it's tables
but don't know how to show these tables with updated data in another form.
Please suggest any way!
Thankx

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by choudhuryshouvi
0

here is a code snippet for you. try this.
here a listview control is used to display values from some selected columns.
here conn is the connection object. replace used ones with your object names

Dim str as string
Dim rs as New ADODB.Recordset
Dim li as ListItem

str="select ecode,ename,salary from employee order by ecode"
rs.open str,conn,1,2

if rs.recordcount>0 then
   rs.movefirst
   while not rs.eof()
     with listview1
        set li=.listitems.add(,,(rs!ecode))
        li.subitems(1)=rs!ename
        li.subitems(2)=format(rs!salary,"0.00")
     end with
     rs.movenext
   wend
end if

if rs.state=adstateopen then rs.close
set rs=nothing

regards
Shouvik

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.