Hi,

I am creating an information system with a database and table which contains 4 fields ( shopid, catergoryid, name and floor) The idea is that when the user selects a checkbox, it displays all shops with the relevant catID, so for example, cat 1 = major stores, if chkMajorStores is seelcted, the listbox updates itself with a multicolumn display of all matching shops with catid 1(ID, name and floor - category is irrelevant in the display, but i think i can hide that using column width somehow?)

Also multiple checkboxes can be selected.

I have looked at listbox and listviews and cant really find any code to get me started... I did manage to get a connection and display the shop names only, however i'd prefer to hard code it into my system and learn what i am doing.

Any ideas or alternative solutions? Do i need to create queries in Access?

Ok I have thought about it and ended up using a datagridview.. But i am still unsure about how i can display the required rows.

The idea is:

checkedlistbox has options selected, somehow i assign each box to a a number 1-10. if box 1.selected = true then datagridview displays relevant rows by matching selected value with column CatID.

Any ideas? Maybe im better off using seperate check boxes or buttons?

Please help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.