473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Using Combo Box To Select query criteria

First of all I want to thank all of you that have helped me in the past this is an awesome fourm.

My problem today is I have a database that builds charts that are viewed by a large group every friday morning. I am building six different charts that all have query criteria of between two dates right now I am going and updating the charts manually every week. The dates these charts work on is always friday to thursday every week. Is there anyway to make the querys select criteria by days of the week. Or I could go and manually enter all the date ranges I would like to have an option into a combo box for the viewers to select. I have searched and can't find anything on using a combo box to input query criteria or making access reconize to change the criteria one week later on a certain day of the week. I hope i have been clear enough hard to explain and thank you all in advance.

Thanks!
Oct 12 '07 #1
2 3905
NeoPa
32,556 Expert Mod 16PB
This is perhaps a little vague, but if I understand you correctly you want the date ranges for particular queries to be selectable on a form, rather than hard-coded into the queriy(ies) itself?
If so, you can build a form with a TextBox which would be set up in code (OnOpen) to default to the best-guess value of the closing date but allow the operator to change it if they need to.
Your query would then be designed to access this TextBox on the form to determine its date range. To make it easier, you could have another TextBox on the form which is updated in the AfterUpdate event of the first TextBox always to show a date six days before the other one (thereby always having matching Start & Finish dates).
Does that help?
Oct 12 '07 #2
nico5038
3,080 Expert 2GB
Can you start by posting one of the queries you use ?

Looks to me you just need all dates from a complete week starting on Friday and finishing on Thursday.
This can be automated and even "calculated" for all data you have in your table. By using the data in your table you can offer the user a combobox showing all startdates that are available. Thus only existing dates can be selected and you don't have to worry about "impossible" dates.

When the reports are always the same (you have no updates on closed weeks), then you could store just the chart of a week in a file holding the year and weeknumber.

Nic;o)
Oct 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: BigJay | last post by:
I am 1. trying to have a combobox used as a selector to display records in a subform. and not sure on how to get selected info into subform.the combo is populated but can not get subform updated...
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
7
by: keliie | last post by:
Hello Just a quick question that I've spent a few hours trying to solve with no luck (although one would think this should be fairly easy). I have a form with a subform. The subform is based...
2
by: visionstate | last post by:
Hi there, I am working on a form that uses 3 text boxes and 3 combo boxes. When any data is entered into any of these, I click a command button and this requeries a sub query in the form and...
6
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main...
1
by: tomlebold | last post by:
Having problems displaying query results from combo boxes on a sub form, which is on the same form that is used to select criteria. This has always worked form me when displaying query results on...
4
by: torontolancer | last post by:
Hi there how r u .I would really appriciate ur concern regarding checking out this code. its beind a command button and i am have a combo box selecing a query criteria and then pressing the button...
1
by: G04 | last post by:
Hi All, I have a continuous form with all records. For each field there is a combo in the form header and the form also contains a Toggle button "Apply Filter". When clicked, it changes to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.