VB How-ToAsk your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
You should have an opening " mark as the one before the & is the end of the literal string and the & is joining the first part to the current value of the textbox item's itemdaa property. So, your whole select statement should look like this:
"select * from ans_table, ss_table where ss_table.qnsID = " & List1.ItemData(List1.ListIndex)