Report Listbox

S

Skymgr

I am using Access 2000 for my proposal DB. There are
several analysts that utilize the DB and I have a table
that contains the Analysts names. I have a report form
that has 15 command buttons for different types of
reports. One button will produce a report for a specific
analyst. Upon selecting the Request Analyst Activity
Report button, the user is asked to enter the analyst
initials (run from Q_ActiveAnalyst) and a report for that
analyst is produced. I would like to have a listbox popup
that contains a listing of the names that the user would
select from in place of entering the initials. The event
procedure for this button is as follows:
Private Sub Button12_Click()
' Open the Analyst Activity Report
DoCmd.OpenReport "R_Analyst Activity",
acViewPreview, "Q_ActiveAnalyst"
End Sub
Is there a way that this can be done?
I would appreciate any help that you can provide.
Thanks!
 
S

SA

Sky:

What you want to do is to add the list box to your existing form, or create
a new form that is popped up from the button that contains the list box.

You can get create with the list box and set it to be a multi-column
listbox, where the first column is the analyst's initials and the second is
their name. Set the bound column to be the first column, and set the row
source to be a query where you pull the appropriate fields from
q_activeAnaylst

Currently your report may have a prompt in the conditions row for the
analyst initials. you can drop that prompt from the query entirely so the
report simply returns the records for all the analysts.

Then in the command button that would display the report, your code would
look like this:

Docmd.OpenReport "R_Analyst Activity", _
acViewPreview, , "[AnalystInits] = '" & Me!MyListBox.Column(0) & "'"
 
S

Skymgr

Steve,
I tried your suggestion and couldn't make it work. Let me
give you some additional information. My report button
sequence is as follows:
1) Button 12 opens report R_Analyst Activity (upon
entering the Analyst Initials in the pop-up window)
2) The report (R_Analyst Activity) filter is set
for "(((([T_Analyst].[Initials])=[Enter Analyst Initials])
And (([T_Proposal].[Status])="In Negotiation" Or
(([T_Proposal].[Status])="Proposed" Or ([T_Proposal].
[Status])="To be Proposed" Or ([T_Proposal].[Status])
="Updating" Or ([T_Proposal].[Status])="USG Factfinding"
Or ([T_Proposal].[Status])="Hold"))))"
3) The query Q_ActiveAnalyst Criteria under Initials
column [Enter Analyst Initials]

I'm not sure how to create a Listbox that is tied to
button 12 so that it pops up when the button is clicked
on. Any additional help that you can provide is
appreciated. The DB works fine with entering the initials,
but I would like to enhance the report request with the
option of selecting from a list (for management).
Thanks in advance,
Skymgr
-----Original Message-----
Sky:

What you want to do is to add the list box to your existing form, or create
a new form that is popped up from the button that contains the list box.

You can get create with the list box and set it to be a multi-column
listbox, where the first column is the analyst's initials and the second is
their name. Set the bound column to be the first column, and set the row
source to be a query where you pull the appropriate fields from
q_activeAnaylst

Currently your report may have a prompt in the conditions row for the
analyst initials. you can drop that prompt from the query entirely so the
report simply returns the records for all the analysts.

Then in the command button that would display the report, your code would
look like this:

Docmd.OpenReport "R_Analyst Activity", _
acViewPreview, , "[AnalystInits] = '" & Me! MyListBox.Column(0) & "'"


--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

I am using Access 2000 for my proposal DB. There are
several analysts that utilize the DB and I have a table
that contains the Analysts names. I have a report form
that has 15 command buttons for different types of
reports. One button will produce a report for a specific
analyst. Upon selecting the Request Analyst Activity
Report button, the user is asked to enter the analyst
initials (run from Q_ActiveAnalyst) and a report for that
analyst is produced. I would like to have a listbox popup
that contains a listing of the names that the user would
select from in place of entering the initials. The event
procedure for this button is as follows:
Private Sub Button12_Click()
' Open the Analyst Activity Report
DoCmd.OpenReport "R_Analyst Activity",
acViewPreview, "Q_ActiveAnalyst"
End Sub
Is there a way that this can be done?
I would appreciate any help that you can provide.
Thanks!


.
 

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

Similar Threads

ListBox 1
Report grouping based on same data in multiple fields 1
HR Report 3
12 Month Report 6
Parsing Out Text String(s) Into New Fields 7
Report creation help 4
Help with approach to report 5
access report 0

Top