Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open the Query Builder from VB

Status
Not open for further replies.

StellarOwl

Programmer
May 10, 2002
2
US
Newbie questions re. the Query Builder.

From the Database window if I click "Create a query in Design view", I bring up the query builder.

1. Can I bring up the query builder from VB?
2. Given 1. - Can I bring it up modally?
3. Given 1. - and assuming the user saves a query, can I capture the name of the saved query?

TIA

StellarOwl
 
1. DoCmd.RunCommand acCmdNewObjectQuery should open the query builder dialog.

2. I believe this is brought up modally.

3. I dont think the last is possible. When presented with this, I ask users to name queries with their username, followed by their personal query name. I then scan the db objects for query names which begin with their username... James Goodman
 
>>>1. DoCmd.RunCommand acCmdNewObjectQuery should open the query builder dialog.

It certainly does! ThankYou!


>>>2. I believe this is brought up modally.

Initially yes, but with the closing of the Add Tables dialog it becomes modeless.
So, I'll use a slightly modified version of MS's SetWaitable to "hang around" for a while.


>>>3. I dont think the last is possible. When presented with this, I ask users to name queries with their username, followed by their personal query name. I then scan the db objects for query names which begin with their username...

Dealing with a very simple (single user at a time) environment, I'll monitor QueryDefs and "grab" any new entries.

Thanks again.

StellarOwl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top