Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing Multiple Query Criteria.

Posted on 2004-04-01
2
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 54

Accepted Solution

by:
nico5038 earned 1600 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 400 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

715 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