Solved

Changing Multiple Query Criteria.

Posted on 2004-04-01
2
262 Views
Last Modified: 2008-03-06
Hi,

I have an access database that contains the linked tables.  All the tables have the same specifications - they contain standard accounting information for several companies.

My database performs analysis of the information from these linked tables by extracting data for one quarter year at a time.  Therefore I have built up a series of append and delete queries, which have all been put into Macros.  When the user presses a button the data is all deleted and refreshed.  However at present each individual append query need it's criteria updated so that only the relevant quartey year's data is extracted from the tables.

I want to create a button which when clicked asks the user the enter ( once ) the quarter year he's interested in.  All the append queries shoudl then be run according to that criteria without manually having to update each and every one separatey.  I guess the criteria needs to refer to a dialog box form which runs when the user  clicks the button and then the macro needs to be run making sure that it "remembers" that the user has choosen the quarter-year criteria.

Can someone advise please - sorry to be so long- winded, but I'm nervous about playing around with my database now that i've got it to work.

Thanks,

Andrew
0
Comment
Question by:AndrewMcLaughlin
2 Comments
 
LVL 54

Accepted Solution

by:
nico5038 earned 400 total points
ID: 10730938
Hi Andrew,

Best to create a form with a combo for the quarter selection.
Best to extract Year & Quarter from the data your need to filter like:
select distinct format([datesales],"yyyyq") as YearQuarter from tblSales

Now you can use a reference to this form field (combo) in your queries to select the needed quarter.

Can you copy/paste a sample of one such selection queries ?

Nic;o)
0
 
LVL 17

Assisted Solution

by:walterecook
walterecook earned 100 total points
ID: 10731914
Just to talk a little philosophy around "I'm nervous about playing around with my database now that i've got it to work"
Just create a development copy and play in it.  This is good programming practice anyway and if something blows up, who cares, you still have your production db.

Walt
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question