If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Lookup currentdb queries in tbl
Hi All,
I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan |
#2
|
|||
|
|||
Lookup currentdb queries in tbl
You've apparently decided on an approach ("combobox listing queries")...
Now, what business problem are you attempting to solve? (there may be more than one potential solution!) -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "GMan" wrote in message ... Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan |
#3
|
|||
|
|||
Lookup currentdb queries in tbl
The queries are already listed in a system table mSysObjects at least that's
what it's named in Access 2003). You can view System tables by clicking Tools Options View, and check System Objects. You can open the tables to see what is in them, but don't touch anything beyond that. Once you have looked at them, hide them again. You can create a query along the lines of: SELECT [Name] FROM MSysObjects WHERE [Type] = 5 AND Left([Name],1) "~" ORDER BY [Name] I think there are other ways to get the same list, but that's probably the simplest. That being said, I wonder along with Jeff what you are trying to accomplish. Is the idea to open the queries directly? Do you see that as preferable to using forms or reports? If you have a similar combo box for tables, I need to point out that tables should not be exposed directly to the users. However, it seems you are saying the table list opens the tables. If so, what is the code? What code are you trying to use to open the queries. GMan wrote: Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Lookup currentdb queries in tbl
On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "ChooseReportFromList2.mdb" which illustrates how to do this. You can download it for free he http://www.rogersaccesslibrary.com/f...ts.asp?TID=382. The sample name says "Reports" but this one has the option to select queries as well as reports for printing. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "GMan" wrote in message ... Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan |
#5
|
|||
|
|||
Lookup currentdb queries in tbl
Cheers Fella's replies much appreciated.
I want my user to be able to create and preview their own queries, the combo box will list the database queries, ive placed 2 buttons below, 1 for New Query, the other Open Query after selecting from the combo box. I'm gonna look at the sample from Roger and i'll post later on my results, any other suggestions always welcome. -- GMan "GMan" wrote: Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan |
#6
|
|||
|
|||
Lookup currentdb queries in tbl
Hi Roger,
Ta for the sample DB. Its exactly what i want to do, but i want to do it on one form. I'm gonna have a sort out with the code and try a few things. I'll come back to you with either what ive done, or a thank you for your stunning example and of course i can always post it to you. Many thanks. -- GMan "Roger Carlson" wrote: On my website (www.rogersaccesslibrary.com), is a small Access database sample called "ChooseReportFromList2.mdb" which illustrates how to do this. You can download it for free he http://www.rogersaccesslibrary.com/f...ts.asp?TID=382. The sample name says "Reports" but this one has the option to select queries as well as reports for printing. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "GMan" wrote in message ... Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan . |
#7
|
|||
|
|||
Lookup currentdb queries in tbl
Hi Jeff,
I'm creating a db bottom up for a catering solution (, supplier, ingredients, recipe control, etc). Ive created a seperate form which i can call in from the main page and i want to have a combo box, which lists the actual queries in the db, it will also allow me to create a new query that opens the design view. In short, i want to recreate what access does, but on a front end form and blocking the user from accessing the backend tables. -- GMan "Jeff Boyce" wrote: You've apparently decided on an approach ("combobox listing queries")... Now, what business problem are you attempting to solve? (there may be more than one potential solution!) -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "GMan" wrote in message ... Hi All, I want a combo box to list all the queries in the current db so the query can be selected and opened using a button within a form. I've created a Tbl for the Qry's to go in... I've got a combo box on my form that reads the tbl list... that works I cant link the tbl list to the db query list. Ive read around the subject and it says something about Modules!!? Any help would be much appreciated -- GMan . |
Thread Tools | |
Display Modes | |
|
|