• save query by form (Access 2000)

    Author
    Topic
    #401112

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #787697

      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)

      ID Description WhereCondition
      1 Last year’s orders Year([OrderDate]) = Year(Date())-1
      2 Orders from customer 23 [CustomerID]=23
      3 Amounts over $1000 [Quantity]*[UnitPrice]>1000

      You’d have to write code to add a record to this table if the user wants to store a where-condition.

    • #787698

      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)

      ID Description WhereCondition
      1 Last year’s orders Year([OrderDate]) = Year(Date())-1
      2 Orders from customer 23 [CustomerID]=23
      3 Amounts over $1000 [Quantity]*[UnitPrice]>1000

      You’d have to write code to add a record to this table if the user wants to store a where-condition.

    Viewing 1 reply thread
    Reply To: save query by form (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: