previewing *current* report only

  • Follow


hi, i'm no fundi on access - *especially* when it comes to things like 
expressions and macros. 

I've adapted a template database to suit my personal needs of a client 
database. Everything works fine. I've created a report to print from the form 
which contains all the client's information. I've got an icon on the form 
which takes me to a print preview window, in which i can view the report. 
However instead of just previewing the CURRENT report (ie the report for the 
form i'm currently working on), the preview includes every single client 
already on the database, and politely arranges them alphabetically. So before 
i can even view my report, i've got to first hunt it down amongst the dozens 
of others. 

How can i just view the current report, when clicking on the preview option? 
0
Reply Utf 1/2/2008 9:26:00 AM

"lucille" <lucille@discussions.microsoft.com> wrote in message 
news:05449B52-FB1F-439D-8046-E9709F78B5ED@microsoft.com...
> hi, i'm no fundi on access - *especially* when it comes to things like
> expressions and macros.
>
> I've adapted a template database to suit my personal needs of a client
> database. Everything works fine. I've created a report to print from the 
> form
> which contains all the client's information. I've got an icon on the form
> which takes me to a print preview window, in which i can view the report.
> However instead of just previewing the CURRENT report (ie the report for 
> the
> form i'm currently working on), the preview includes every single client
> already on the database, and politely arranges them alphabetically. So 
> before
> i can even view my report, i've got to first hunt it down amongst the 
> dozens
> of others.
>
> How can i just view the current report, when clicking on the preview 
> option?


Here's an example from a current project ...

Private Sub cmdPrint_Click()

    DoCmd.OpenReport "Buddies", acViewPreview, , "BuddyID=" & Me!BuddyID

End Sub

In this example "Buddies" is the name of the report, and "BuddyID" is the 
name of the primary key field that uniquely identifies the record. For more 
details, see the help topic on the OpenReport method. Here's a link to the 
on-line help topic ...

http://msdn2.microsoft.com/en-us/library/bb238032.aspx

-- 
Brendan Reynolds 

0
Reply Brendan 1/2/2008 10:44:52 AM


The answer, of course, depends on what you mean by "current report".  I
suspect that Brendan has answered your question by providing a mechanism for
you to view the report of the record currently displayed in the form you are
looking at.  This should work well if you are using a "single form", but I'm
not so sure of the results if you are using a continuous form...

Good luck!

-- 
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

"lucille" <lucille@discussions.microsoft.com> wrote in message
news:05449B52-FB1F-439D-8046-E9709F78B5ED@microsoft.com...
> hi, i'm no fundi on access - *especially* when it comes to things like
> expressions and macros.
>
> I've adapted a template database to suit my personal needs of a client
> database. Everything works fine. I've created a report to print from the
form
> which contains all the client's information. I've got an icon on the form
> which takes me to a print preview window, in which i can view the report.
> However instead of just previewing the CURRENT report (ie the report for
the
> form i'm currently working on), the preview includes every single client
> already on the database, and politely arranges them alphabetically. So
before
> i can even view my report, i've got to first hunt it down amongst the
dozens
> of others.
>
> How can i just view the current report, when clicking on the preview
option?

0
Reply Jeff 1/2/2008 1:07:03 PM

"Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in message 
news:u2xj5BUTIHA.1184@TK2MSFTNGP04.phx.gbl...
> The answer, of course, depends on what you mean by "current report".  I
> suspect that Brendan has answered your question by providing a mechanism 
> for
> you to view the report of the record currently displayed in the form you 
> are
> looking at.  This should work well if you are using a "single form", but 
> I'm
> not so sure of the results if you are using a continuous form...


Well ... there's only one current record in a continuous form, Jeff, so the 
result is the same regardless of whether the form is a single record or 
continuous form - the current record is printed.

Whether that is in fact the desired result is of course a valid question. 
:-)

-- 
Brendan Reynolds 

0
Reply Brendan 1/2/2008 3:02:42 PM

Thanks, Brendan.  I hadn't run through that scenario before, so I wasn't
sure if the issues that have cropped up in continuous forms extended to this
area also...

Regards

Jeff

"Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
news:367C13C6-30DA-4B36-8384-B8132FBB6024@microsoft.com...
> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in message
> news:u2xj5BUTIHA.1184@TK2MSFTNGP04.phx.gbl...
> > The answer, of course, depends on what you mean by "current report".  I
> > suspect that Brendan has answered your question by providing a mechanism
> > for
> > you to view the report of the record currently displayed in the form you
> > are
> > looking at.  This should work well if you are using a "single form", but
> > I'm
> > not so sure of the results if you are using a continuous form...
>
>
> Well ... there's only one current record in a continuous form, Jeff, so
the
> result is the same regardless of whether the form is a single record or
> continuous form - the current record is printed.
>
> Whether that is in fact the desired result is of course a valid question.
> :-)
>
> -- 
> Brendan Reynolds
>

0
Reply Jeff 1/3/2008 2:05:52 AM

4 Replies
168 Views

(page loaded in 0.096 seconds)

Similiar Articles:
















7/23/2012 12:27:08 PM


Reply: