Form to display query results.

specialk9203

New member
Local time
Yesterday, 19:48
Joined
Dec 12, 2014
Messages
5
In my form I have a dropdown box. There are 7 values and based on the value it will run that query in sql server. I would like to have the query open in the form instead of opening up on a different tab. Currently on the command button click there are a bunch of if statements depending on what is selected on the combo box. Each value has a query associated with it because there are 7 different sql server DB's. The code is slightly different with each query. any help insight would be great!
 
I suppose that one could cycle through a query's columns and build a form accordingly, then delete it when the form is closed.

What not use the form wizard to build a basic design for each of your queries, or change the record source of a generic form based upon a query. If the query columns are different in each query, you could still use the same form by programmatically changing the various form controls record source.

Each of those methods creates unnecessary complexity. Create a separate for for each query. Then a neophyte will be able to understand.
 
Thanks for the reply. I'm trying to keep the form as simple as possible. I ended up using a pop up report for each query. That way I could stick with one form and modify the design of the report
 

Users who are viewing this thread

Back
Top Bottom