473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

pop up Query Builder in VBA

hi

:)

i was wondering if it's possible to call the query builder in VBA and then store the SQL it comes up with after the user has built a (temporary) query?

kind of like how the lookup for a field in a table works

thanx in advance

ol
Apr 25 '07 #1
11 4782
NeoPa
32,556 Expert Mod 16PB
I'm not aware of that as a possibility, but it's a neat idea.
Getting the SQL out of a saved query (QueryDef) is easy enough, but getting the query builder window to open while code is running is another matter.
Let us know if you get any joy with this.
Apr 26 '07 #2
ADezii
8,834 Expert 8TB
I'm not aware of that as a possibility, but it's a neat idea.
Getting the SQL out of a saved query (QueryDef) is easy enough, but getting the query builder window to open while code is running is another matter.
Let us know if you get any joy with this.
I actually may get this concept to work from coming in the back door with a single line of code as opposed to trying to hook the code in the Access Builder/Wizard, whatever. Calling this Function from anywhere within the Access Environment seems to work, but it does have its faults. Just give me your input whenever you get a chance, I'm curious. I call this Function from RunCode within a AutoKeys Macro, and assign it the Shortcut Key combination of SHIFT+F9.
Expand|Select|Wrap|Line Numbers
  1. Public Function fOpenQueryBuilder()
  2.   Application.CommandBars("Database").Controls("New Object").CommandBar.Controls("Query").Execute
  3. End Function
Apr 27 '07 #3
NeoPa
32,556 Expert Mod 16PB
Now what happens when the operator wants to edit the query but the coder doesn't want to lose focus?
Alternatively, what can trigger the code to come back in and do {whatever} with the new query once it's been saved?

BTW Neat find on the QueryBuilder bit :)
Apr 27 '07 #4
ADezii
8,834 Expert 8TB
Now what happens when the operator wants to edit the query but the coder doesn't want to lose focus?
Alternatively, what can trigger the code to come back in and do {whatever} with the new query once it's been saved?

BTW Neat find on the QueryBuilder bit :)
I did say I 'may' get this concept to work.
Apr 27 '07 #5
NeoPa
32,556 Expert Mod 16PB
Sorry to sound negative ADezii.
I foresaw some problems and thought I ought to share up front ;(
Apr 30 '07 #6
ADezii
8,834 Expert 8TB
Sorry to sound negative ADezii.
I foresaw some problems and thought I ought to share up front ;(
Thanks for sharing. Now I sound like I am a member of AA!
Apr 30 '07 #7
NeoPa
32,556 Expert Mod 16PB
That's both of us ADezii :)
A congratulatory thread is wholly in keeping with the ethos then after you post another 15 or so and get to four figures. I can hardly wait (unless I have to go to bed of course - or worse, just go to sleep where I sit).
Apr 30 '07 #8
ADezii
8,834 Expert 8TB
That's both of us ADezii :)
A congratulatory thread is wholly in keeping with the ethos then after you post another 15 or so and get to four figures. I can hardly wait (unless I have to go to bed of course - or worse, just go to sleep where I sit).
Thanks for pointing this out to me, NeoPa, I actually was paying no attention to detail - just Tunnel Vision I guess!
Apr 30 '07 #9
NeoPa
32,556 Expert Mod 16PB
I'm hoping to catch you later then ;)
May 1 '07 #10
ADezii
8,834 Expert 8TB
I'm hoping to catch you later then ;)
Always a pleasure.
May 1 '07 #11
NeoPa
32,556 Expert Mod 16PB
Always a pleasure.
I didn't quite catch the 1,000 post mark - but I got the thread up now anyway :)
(ADezii Hits the Four Digits)
May 2 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe Del Medico | last post by:
I have two tables A & B and I want to delete all the records in A that are not in B. Can I do this in the query builder? It seems like a simple problem. I can easily find the records in A that...
5
by: meyvn77 | last post by:
I wrote a bunch of SQL statement in SQL SERVER and now im trying to do the same thing in access. OMG what a pain that Access can't handle updates or CAST() the way SQL server can. OK I thought I...
1
by: MR | last post by:
Is there a limitation to the number of columns you can define in the Query Builder of a data adapter? it seems the limit is around 96. i know i can split the query into two parts, but then it would...
2
by: dio | last post by:
Hi there, I'm trying to create an OleDBDataAdapter with a command that will receive a parameter to act as a filter on the query. I'm using the Query Builder wizard and it works fine, unless I...
2
by: MLH | last post by:
I invoked the combo-box wizard today, telling it to use a 4-table union query as a row-source for the combo-box it was assisting me in building. The error I got was without number and stated,...
0
by: sales | last post by:
I am glad to present to the community of this group the new version of our component intended for visual building of SQL queries via an intuitive interface - Active Query Builder...
4
by: Daz Talbot | last post by:
Hi there Does anyone know if it is possible to invoke the SQL Server Query Builder from within a VB.NET program. I'd like to have query building functionality within my application. Thanks...
13
by: john | last post by:
I have table User-App and table App Profile User-App App Profile IDuser IDApp IDApp 1 34 34 1 45 45 2 34 2 45 2 90 3 34
3
by: Thorben Grosser | last post by:
Hello Newsgroup, I am doing some archive database and therefore got one table indexing every folder and one table storing which rack belongs to which department, eg: table folders :...
6
by: FrozenDude | last post by:
Does anyone know of or have a favourite 3rd party Visual Query Builder? We are looking for a very easy to use interface that provides SQL code verification, table joins etc. Thanks, Dave
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.