A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup currentdb queries in tbl



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2009, 01:26 PM posted to microsoft.public.access.forms
Gman
external usenet poster
 
Posts: 41
Default 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  
Old December 15th, 2009, 01:51 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default 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  
Old December 15th, 2009, 02:16 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default 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  
Old December 15th, 2009, 02:49 PM posted to microsoft.public.access.forms
Roger Carlson
external usenet poster
 
Posts: 824
Default 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  
Old December 15th, 2009, 06:19 PM posted to microsoft.public.access.forms
Gman
external usenet poster
 
Posts: 41
Default 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  
Old December 15th, 2009, 07:32 PM posted to microsoft.public.access.forms
Gman
external usenet poster
 
Posts: 41
Default 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  
Old December 15th, 2009, 07:37 PM posted to microsoft.public.access.forms
Gman
external usenet poster
 
Posts: 41
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.