Solved

Changing Multiple Query Criteria.

Posted on 2004-04-01
2
264 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

738 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