NigeLost Level: Protégé
 Registered: 21-11-2006 Posts: 6
|
Filter query database, select from ListBox and beyond...
(VB Exp 2005, SQL Exp 2005)
Let me put my situation into context and see if that helps you kind folks to help me.......
I run a number of training/consultancy sessions on a specific kind of analysis.
There are 3 categories of instrument: WS, JS & Obs
Each has specific inputs but all categores have a similar 4-point set of scores
I have 4 SQL DBases: Session, WS, JS, Obs
What I need to be able to do is:
Set up a new session, with an ID, Name & date, or select a past one. Then:
- Enter WS, JS, Obs data "on the fly", during the Session
- Have a Session List & 3 separate Category lists (tabbed Listboxes?) where all items are dynamically updated
- Where I can select a Session and in the 3 Category Lists, all items in the Category relating to that Session are listed
- And selecting from the list will pull data from the appropriate DBase and process it into a diagram
I have:
Input Forms for each Category and can relate the 3 instrument forms (Read Only TextBoxes confirm this) to a specific Session.
I have a tabbed set of Listboxes to save real estate. I can populate them but I am having difficulty in filtering - all items in the category are listed. I have tried the SELECT Query (Select wsName, from wsList, where (sessionID =@sessionID). That created an error: "The new command text returns data with schema different from the schema of the main query. Check your query's command text if this is not desired."
I have researched that and it appears it requires a DBNull acceptance, which I have done, but the filter is still not working.
Also, I need to know how I can work the OnClick of an item in the list to get the details form the Dbase as it will have the item's name but not the ID.
Am I approaching the issue in the wrong way?
How do I get around the problems?
Your help would be much appreciated.
|