Results 1 to 2 of 2
  1. #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?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 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)

    <table border=1><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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts