|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Oct 2001
Location: Essex, United Kingdom
Posts: 124
|
I'm trying to write a report in access to show me all sales made between any two dates (selected by the user).
I'm not sure how to go about this as from what I see you cant use command buttons on reports and thats the only way I can think to do it?! Please has anyone got an explanation of how this can be done? Thanks
|
|
|
|
|
|
#2 |
|
Member (7 bit)
Join Date: Sep 2002
Location: Pueblo, Colorado
Posts: 101
|
Hi mrstarface!
One of the places I go for help in Access is http://www.access-programmers.co.uk/ They also have forums for troubleshooting/learning Access. Another place is http://www.utteraccess.com/ They have a food forum too. I have a database with a screen that pops up when I select a report. It asks for the start date and end date, but I cannot remember how I did it four years ago. I just did a quick search on both forums, but did not find anything there about your question. Try joining their forums and posting your question there too. There are a lot of people that know more than I do there. You might also try using Google to search for the answer to your question Hope this is of some help
Last edited by RoyKelly; 12-10-2002 at 11:36 PM. |
|
|
|
|
|
#3 |
|
Member (11 bit)
Join Date: Dec 2001
Location: Shakopee MN
Posts: 1,293
|
In the query that hits the data table you need to have a date field(date of sale or what ever this date is called) and then in the row called Criteria for this date field (in a select query it is top to bottom "Field"-"Table"- "Sort" -"Show"- "Criteria" and finally "or") you put in
Between [Type in Beginning Date:] And [Type the ending date:] you can change the wording inside the brackets if you like. This is called a parameter (check out help in access.) Every time the query is run the user will be asked with two pop up windows for the date ranges. What you put inside the square brackets is what shows up on the pop up window. You can also place this date range in the report header so you only need to develop one report, depending on the date range entered then makes your one report a universal one. To do this place a text box in the header and the control source is exactly the same as what is in the square brackets. (you need one for each range of course!) so for example Label with "This report is for sales between" Text box with the control source "Type in Beginning Date:" Label with "And" Text box with control source "Type the ending date:" align these all horizontally. Hope this helped edit Also... put in another label and text box with the label "Current date" and the text box with control source set to "=Now()" so you know when the report was run... end edit Last edited by sdkfz; 12-11-2002 at 08:37 AM. |
|
|
|
|
|
#4 |
|
Professional gadfly
|
If you have a lot of reports like that, the best thing to do is to create a report-generating form. That form can have text boxes for From and To dates, as well as any other information you would like, with a button for each report that you have. When you click the button, the appropriate dates are put into the query and the report is opened. This makes it easy to print reports, as they are all in one place. Depending on how sophisticated you want to make it, you can even add shortcut buttons to automatically fill in the dates for this month, year to date, or any combination you want.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|