PC Review


Reply
Thread Tools Rate Thread

Display only a certain category in a report

 
 
bzeyger
Guest
Posts: n/a
 
      14th Jan 2008
Hello,

I have a customer report I had made in Access VBA. I have a report header as
a project name with a bunch of tasks that are associated with it:

Example:


Project ABC:
Employee1 Work 40 Hrs
Employee2 Sleep 25 Hrs
Employee3 Work 15 Hrs
Employee4 Drive 3 Hrs


How can I get the report to only display the employees with WORK listed?
I did not want to change the query associated with the report.

Before the report would display, a dropdown box would appear, asking what
category the user would like to see.

 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      15th Jan 2008
On Mon, 14 Jan 2008 12:43:04 -0800, bzeyger
<(E-Mail Removed)> wrote:

>How can I get the report to only display the employees with WORK listed?
>I did not want to change the query associated with the report.
>
>Before the report would display, a dropdown box would appear, asking what
>category the user would like to see.


Use the AfterUpdate event of the combo box to launch the report, including a
"where condition" to select only the Work records.

One question though: do you want to display all of the categories for the
selected employees (just so long as at least one of them is "Work"), or do you
just want to display those records which contain Work as a category?

John W. Vinson [MVP]
 
Reply With Quote
 
bzeyger
Guest
Posts: n/a
 
      15th Jan 2008
I wanted to display only the Work catagory. The user wold select an option
from a dropdown box prior to launching the report. The drop would hold the
task desired and the report should only display that task.

"John W. Vinson" wrote:

> On Mon, 14 Jan 2008 12:43:04 -0800, bzeyger
> <(E-Mail Removed)> wrote:
>
> >How can I get the report to only display the employees with WORK listed?
> >I did not want to change the query associated with the report.
> >
> >Before the report would display, a dropdown box would appear, asking what
> >category the user would like to see.

>
> Use the AfterUpdate event of the combo box to launch the report, including a
> "where condition" to select only the Work records.
>
> One question though: do you want to display all of the categories for the
> selected employees (just so long as at least one of them is "Work"), or do you
> just want to display those records which contain Work as a category?
>
> John W. Vinson [MVP]
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      15th Jan 2008
On Tue, 15 Jan 2008 10:42:01 -0800, bzeyger
<(E-Mail Removed)> wrote:

>I wanted to display only the Work catagory. The user wold select an option
>from a dropdown box prior to launching the report. The drop would hold the
>task desired and the report should only display that task.
>
>"John W. Vinson" wrote:
>
>> On Mon, 14 Jan 2008 12:43:04 -0800, bzeyger
>> <(E-Mail Removed)> wrote:
>>
>> >How can I get the report to only display the employees with WORK listed?
>> >I did not want to change the query associated with the report.
>> >
>> >Before the report would display, a dropdown box would appear, asking what
>> >category the user would like to see.

>>
>> Use the AfterUpdate event of the combo box to launch the report, including a
>> "where condition" to select only the Work records.
>>
>> One question though: do you want to display all of the categories for the
>> selected employees (just so long as at least one of them is "Work"), or do you
>> just want to display those records which contain Work as a category?
>>
>> John W. Vinson [MVP]
>>


Use the AfterUpdate event of the combo box with code resembling:

Private Sub combobox_AfterUpdate()
If Not IsNull(Me!combobox) Then
DoCmd.OpenReport "YourReportName", _
WhereCondition:="[Category] = '" & Me!combobox & "'"
End If
End Sub

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: how do I display items within a category Judy Gleeson \(MVP Outlook\) Microsoft Outlook Discussion 0 25th Jan 2007 05:44 AM
Display every 3rd category name but still display latest month =?Utf-8?B?bWFyeWo=?= Microsoft Excel Charting 1 24th Sep 2006 09:05 PM
How to display total by category at the end of the report? =?Utf-8?B?TWF1bGlrIEJoYXR0?= Microsoft Access Reports 2 7th May 2006 08:22 AM
How do I display category =?Utf-8?B?Qmx1ZUxvdHVzQGhvdG1haWwuY29t?= Microsoft Excel Worksheet Functions 1 20th Feb 2006 05:57 PM
Axis display as category doco Microsoft Excel Charting 4 12th Dec 2004 04:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 PM.