According to your post, you're looking for the SQL statement...but you already have the recordset complete. If you're needing the code to add it to a listbox, then that raises a question. Do you want the user to click on one item and it highlight both the cemeteryname and code?
If the answer is yes, then the standard listbox will not work for you. You'll need to go out and find a 3rd party control or use a datagrid. The datagrid has row properties that you can add to with the data.
If your answer is no, then set the columns property to 2. Then just use the listbox1.additem method to add the items one at a time to the listbox. The order in which they will go in is left to right, top to bottom. This isn't the cleanest way to go, but it will semi-work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.