Parsing a partial date from a dialog box (1 Viewer)

me1258

Registered User.
Local time
Today, 02:04
Joined
Apr 6, 2004
Messages
37
I want to put a Year To Date total on a report.
The report is a daily sales report for a particular month.
It will show sales by day for 3 separate shops for the chosen month.
When the report opens the user is asked for the mm/yyyy

Is there a way to pull out the YYYY only from the dialog box so I can use that to calc my year to date numbers?
or does anyone have any better idea's

Thanks
:confused:
 

RichO

Registered Yoozer
Local time
Today, 02:04
Joined
Jan 14, 2004
Messages
1,036
DatePart ("yyyy", MyString)

Where "MyString" is the name of the string you assign to the input box.
 

me1258

Registered User.
Local time
Today, 02:04
Joined
Apr 6, 2004
Messages
37
RichO said:
DatePart ("yyyy", MyString)

Where "MyString" is the name of the string you assign to the input box.


Ok .... dont mean to be dumb but I dont even see where I can access the code for the input box.

I set up a query and type

Between [Start Date] and [End Date]

in the criteria box.

And it just creates a dialog box.
That is my problem I dont understand how to see/access the code for that box.

sorry to be nubie

Thanks :confused: :(
 

RichO

Registered Yoozer
Local time
Today, 02:04
Joined
Jan 14, 2004
Messages
1,036
Where does the input box come up?

Is it part of a form before opening the report?
 

me1258

Registered User.
Local time
Today, 02:04
Joined
Apr 6, 2004
Messages
37
no it is from the query I think.
That is where I enter the
between [Start date] and [End date]

When I run the report it is based off the query which then fires and brings up 2 dialog boxes.

The first is

Start date

the second is

End date

I dont seem to be able to find where the code is for these dialog boxe's

Thanks
:confused:
 

RichO

Registered Yoozer
Local time
Today, 02:04
Joined
Jan 14, 2004
Messages
1,036
Does the box say "Enter Parameter Value"?

If so, the query is looking for a value to base its criteria on. There is not an actual piece of code that brings this up, but rather, there is a field somewhere in the query that the query cannot find and it is asking you for its value. If this is the case, I do not believe that you can extract any part of the input text.

Did you develop this DB yourself?

Also, open the report in design view and look at the event tab of the properties box to see if there is an event procedure set up that may produce this input box.

To truly determine whether this box is part of the query or report, open the query by itself. If the box does not come up then it obviously is part of the report.
 

Users who are viewing this thread

Top Bottom