Date question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am sure I am making this much worse than it should be, but what I am trying to do is this:

I have a form that is a menu for selecting reports. There is an option for selecting a report from a prior year. When the user wants one of these reports a pop-up form askes "Which year?" and a text box is provided for the year to be entered. That field is then used to dictate the results on each report. One report is called "Jobs Not Quoted." I want the report to display jobs that were received but not quoted on December 31st of the year selected. How do I enter the criteria to make this work?
 
The last day of the year can be built with the DateSerial function.

DateSerial([Which Year? 2003?],12,31)
 
I'm doing something wrong. Let me try to explain what I have in a little more detail. I have a menu with a button that says "Reports from prior years." Clicking the button starts a macro that opens a form (that is a pop-up) called "Which Year." There is only one text box on the form and it is called "Prior Year." There is also an "OK" button and a "Cancel" button. When the "OK" button is clicked, it opens a new form called "Prior Year Reports Menu" and hides the "which year" form. On this "prior year reports menu," there are several buttons linked to reports. The first button is linked to a report called "Jobs not Quoted." This report should bring up a listing of jobs that were received but not yet quoted as of December 31st of the year entered into the "prior year" field of the "which year" form. Fields in the underlying query to "jobs not quoted" include "Date received," "date quoted," and other identifying information for the job. I want the criteria of the "date quoted" field to return those jobs with dates quoted after December 31st of the year indicated. I want the criteria of "date received" to return jobs that were received on or before December 31st of the year indicated. My question is this: How exactly shoud the criteria for these two fields read to produce the intended results? I hope you can help.


John Spencer (MVP) said:
The last day of the year can be built with the DateSerial function.

DateSerial([Which Year? 2003?],12,31)



Crystal said:
I am sure I am making this much worse than it should be, but what I am trying to do is this:

I have a form that is a menu for selecting reports. There is an option for selecting a report from a prior year. When the user wants one of these reports a pop-up form askes "Which year?" and a text box is provided for the year to be entered. That field is then used to dictate the results on each report. One report is called "Jobs Not Quoted." I want the report to display jobs that were received but not quoted on December 31st of the year selected. How do I enter the criteria to make this work?
 
Back
Top