A family of Microsoft relational database management systems designed for ease of use.
theDBguy i have tried that, but combobox or listbox only takes data in each query. I want the query itself to be listed
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sir/Madam,
I have got about 70 queries already created. The thing i want is that if i create a button to "Run Query", it can run only 1 query. I want to create a button, which when clicked, asks me to enter the respective query name (to be opened). So if i enter the name of query, that particular query opens.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
theDBguy i have tried that, but combobox or listbox only takes data in each query. I want the query itself to be listed
thanks theDBguy. I got it
I have another question. Can we create a button to openform in query
Try the following SQL as a Row Source for your Combobox or Listbox:
SELECT [Name] FROM MSysObjects WHERE [Name] Not Like "~*" AND [Type]=5 ORDER BY [Name]
Hope it helps...
Thats pretty good thought. Can you suggest me the way of linking all the queries to the Combobox or List box
If you ask the user to enter the name of a query, they could make a mistake and enter a wrong name. Then, your code to open the query will fail or get an error. It would be better to use a Combobox or Listbox showing the names of all your queries and all the user has to do is select the one he or she wants to run. Just a thought...