Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Control - how to use List View, Tree View

Status
Not open for further replies.

Cowper

Programmer
Sep 18, 2002
29
AU
Hi,

Can anybody tell me how to use List View and Tree View controls in Access as we do in VB? For example, how can I link List View and Tree View control with tables or queries? How can I add/delete items to these controls?

Thanks

Cowper
 
To add something in a list view control you'll need to create a recordset and input your data into a table, after this you requery your list view control and the new data will apear.
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("yourtable")
rs.AddNew
rs.Fields("register") = Me.ID_cc
rs.Update
rs.Close
Me.lstviewcontrol.Requery

To delete an information you should create a delete query and put a criteria (some control in your form) to delete a especific register.
DoCmd.OpenQuery "Delete Query"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top