Results 1 to 2 of 2
Thread: save query by form (Access 2000)
2004-02-20, 08:42 #1
- Join Date
- Dec 2003
- Thanked 0 Times in 0 Posts
save query by form (Access 2000)
Can i save a query by Form? I mean to save the where condition after i have chosen from a combo ox.
I want to give the user a possibity to buildthe query in the form, save it and use it later to open the report
with that particular where condition. My idea is to use a combo box, select the order under question,and then
somehow save the where condition for later use.This order will be used
when the auditing is carried out and the stock will begin clean.
Is it possible at all?
2004-02-20, 09:09 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: save query by form (Access 2000)
I don't think this is very useful - over time, users will probably open the report with many different where-conditions. Do you want to save them all? How are you going to distinguish them?
But if you really need this, you could create a table like this (data are entirely fictitious and meant for illustration purposes only)
<td align=center>ID</td><td align=center>Description</td><td align=center>WhereCondition</td> <td align=right>1</td><td>Last year's orders</td><td>Year([OrderDate]) = Year(Date())-1</td> <td align=right>2</td><td>Orders from customer 23</td><td>[CustomerID]=23</td> <td align=right>3</td><td>Amounts over $1000</td><td>[Quantity]*[UnitPrice]>1000</td></table>
You'd have to write code to add a record to this table if the user wants to store a where-condition.