Hello everybody.

I am writing a code in Excel which allows user to retrieve invoice data from our SQL server. I am retrieving the data through adodb connection.

I have managed to import required data from SQL to excel, now I would like to take a further step.

I want to create a user form which enables the user to query the required invoice records from server, with specifying customer code, customer name, date or invoice number. I have no problem writing the code which will execute the query, but I couldn't find any solution to show the query results on the form.

Let me give you an example. Let's say I want to retrieve an invoice from the server. This invoice has been issued sometime between 12nd and 16th of this month. I know the customer name but I don't have the invoice number. When I query the server for invoices between 12nd and 16th, I should see the results in the form, let's say, in a grid, with columns such as customer name, customer code, invoice date, invoice number etc. and when I click (or double click) on the relative line, I should be able to start another query which will import all data related to that invoice. Do you have any idea how (or if) I can manage that? Thanks in advance for any answer!