Display result of the query in listbox

aman

Registered User.
Local time
Yesterday, 23:07
Joined
Oct 16, 2008
Messages
1,251
Hi guys

When the user selects start date and End date from the comboboxes in the form then I want to display the result of a report in the listbox. How can I do it?

Actually I have two tables tblmain and tbldata(They have the same structure). I want to count the total number of cases processed by each user and it should look into both the tables:

Code:
strsql="select Date1,username,count(*) from tblmain where username<>null group by username,Date1;

I want to change the above query so that it will count the total number of processed cases from both the tables and display the result in the listbox.

I hope anybody can help me out in this.
Thanks
 
As your tables have the same structure, you could use the SQL UNION to combine the results in a single query. See www w3schools.com/sql/sql_union.asp.
 

Users who are viewing this thread

Back
Top Bottom