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
|
|||
|
|||
Create a Query Form
I have an application that is completely forms driven and I need to allow
users to create ad-hoc queries. Does anyone have have suggestions or examples that I can reference? Thanks in advance! Dwight |
#2
|
|||
|
|||
Create a Query Form
Not sure if that what you mean, but you can try something like:
Create a query, and use the code to change the sql within this query, and then run it. ' To change the SQL in the Query Application.CurrentDb.QueryDefs("Queryname").SQL = "Select * From TableName" Docmd.OpenQuery "Queryname" -- Good Luck BS"D "Dwight" wrote: I have an application that is completely forms driven and I need to allow users to create ad-hoc queries. Does anyone have have suggestions or examples that I can reference? Thanks in advance! Dwight |
#3
|
|||
|
|||
Create a Query Form
I want to create a form which allows a user to create a query against the
tables in the database. The form needs to allow the user to select the tables and fields, set criteria, sort, join, basically everything that can be done within the MS Access query design window. Thanks! "Ofer Cohen" wrote: Not sure if that what you mean, but you can try something like: Create a query, and use the code to change the sql within this query, and then run it. ' To change the SQL in the Query Application.CurrentDb.QueryDefs("Queryname").SQL = "Select * From TableName" Docmd.OpenQuery "Queryname" -- Good Luck BS"D "Dwight" wrote: I have an application that is completely forms driven and I need to allow users to create ad-hoc queries. Does anyone have have suggestions or examples that I can reference? Thanks in advance! Dwight |
#4
|
|||
|
|||
Create a Query Form
In that case using the example I gave you you can do something like
Application.CurrentDb.QueryDefs("Queryname").SQL = "Select " & Me.FieldsName & " From " & Me.TableName & " Order By " & Me.SortFieldName Docmd.OpenQuery "Queryname" I hope that this example gives you an idea -- Good Luck BS"D "Dwight" wrote: I want to create a form which allows a user to create a query against the tables in the database. The form needs to allow the user to select the tables and fields, set criteria, sort, join, basically everything that can be done within the MS Access query design window. Thanks! "Ofer Cohen" wrote: Not sure if that what you mean, but you can try something like: Create a query, and use the code to change the sql within this query, and then run it. ' To change the SQL in the Query Application.CurrentDb.QueryDefs("Queryname").SQL = "Select * From TableName" Docmd.OpenQuery "Queryname" -- Good Luck BS"D "Dwight" wrote: I have an application that is completely forms driven and I need to allow users to create ad-hoc queries. Does anyone have have suggestions or examples that I can reference? Thanks in advance! Dwight |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customers- Contracts form problem | GL | Using Forms | 10 | February 7th, 2006 04:05 PM |
Date range on reports | Mark_Milly | Setting Up & Running Reports | 10 | January 19th, 2006 03:49 PM |
Toolbars, Drop-Down Menus | Rick | New Users | 1 | September 21st, 2005 11:17 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Display Parameter from Form on Report | sara | Setting Up & Running Reports | 10 | July 19th, 2004 04:54 PM |