Using Controls in a Report

  • Thread starter Frank The Novice
  • Start date
F

Frank The Novice

Hi Everyone,

I have a report that generates a calendar month's data. I would like to add
left and right arrows to the footer in order to easily go back one month or
forward one month, but can't seem to get the code to work.

The SQL used to open the report is:
SELECT *
FROM [Daily Record Query]
WHERE (((Month([Daily Record Query]![DoF]) & "/" & Year([Daily Record
Query]![DoF]))=IIf(IsNull([Enter month and year in m/yyyy
format]),Month(Date()) & "/" & Year(Date()),[Enter month and year in m/yyyy
format])))
ORDER BY [Daily Record Query].DoF;

I've tried to write code to add a month or subtract a month, but when I try
to reopen the report, I get an error.

Thanks for your help,

Frank
 
D

Duane Hookom

Reports don't have user interface other than using the page navigation
provided in the preview interface. Is there a reason why you don't use the
paging provided?
 
F

Frank The Novice

Hi Duane,

I guess I wasn't very clear at what I'm trying to do. The report generates
the data from a particular calendar month, ie 12/2008. What I'm trying to
accomplish is go to the data for the previous month or the month after by
clicking a control in the footer of the report.

I have to run totals in several fields for a calendar month, so a continuous
data stream doesn't work.

Any ideas?

Frank

Duane Hookom said:
Reports don't have user interface other than using the page navigation
provided in the preview interface. Is there a reason why you don't use the
paging provided?
--
Duane Hookom
Microsoft Access MVP


Frank The Novice said:
Hi Everyone,

I have a report that generates a calendar month's data. I would like to add
left and right arrows to the footer in order to easily go back one month or
forward one month, but can't seem to get the code to work.

The SQL used to open the report is:
SELECT *
FROM [Daily Record Query]
WHERE (((Month([Daily Record Query]![DoF]) & "/" & Year([Daily Record
Query]![DoF]))=IIf(IsNull([Enter month and year in m/yyyy
format]),Month(Date()) & "/" & Year(Date()),[Enter month and year in m/yyyy
format])))
ORDER BY [Daily Record Query].DoF;

I've tried to write code to add a month or subtract a month, but when I try
to reopen the report, I get an error.

Thanks for your help,

Frank
 
D

Duane Hookom

Reports are static once rendered.

If we knew more about your specifications and what you mean by "run totals
in several fields" we might be able to suggest an alternative.
--
Duane Hookom
Microsoft Access MVP


Frank The Novice said:
Hi Duane,

I guess I wasn't very clear at what I'm trying to do. The report generates
the data from a particular calendar month, ie 12/2008. What I'm trying to
accomplish is go to the data for the previous month or the month after by
clicking a control in the footer of the report.

I have to run totals in several fields for a calendar month, so a continuous
data stream doesn't work.

Any ideas?

Frank

Duane Hookom said:
Reports don't have user interface other than using the page navigation
provided in the preview interface. Is there a reason why you don't use the
paging provided?
--
Duane Hookom
Microsoft Access MVP


Frank The Novice said:
Hi Everyone,

I have a report that generates a calendar month's data. I would like to add
left and right arrows to the footer in order to easily go back one month or
forward one month, but can't seem to get the code to work.

The SQL used to open the report is:
SELECT *
FROM [Daily Record Query]
WHERE (((Month([Daily Record Query]![DoF]) & "/" & Year([Daily Record
Query]![DoF]))=IIf(IsNull([Enter month and year in m/yyyy
format]),Month(Date()) & "/" & Year(Date()),[Enter month and year in m/yyyy
format])))
ORDER BY [Daily Record Query].DoF;

I've tried to write code to add a month or subtract a month, but when I try
to reopen the report, I get an error.

Thanks for your help,

Frank
 
C

Clifford Bass

Hi Frank,

You could control the report from a pop-up form that asks for a
month/year and has previous and next buttons. As a pop-up, it would stay
visible, but still allow interaction in the report such as scrolling and
switching pages. It could also let you jump from one month/year to another.

Clifford Bass
 
F

Frank The Novice

Thanks Clifford,

I didn't think of that solution. I'll give it a try.

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top