Solved

Changing Multiple Query Criteria.

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now