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
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. I created a form that shows the ListBox, but I don’t
know what to do with it.
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
 
J

Jeff Boyce

It sounds like you want to:
have a user select an Analyst from a list (you are using a listbox now)
have a command button open a report based on that selection

If so, one approach would be to use a (lookup) table of Analysts (assuming
AnalystID, AnalystFName, ...) to serve as the source for a listbox (or
combobox) on your form. I'm also assuming that the underlying (?proposal)
data includes a field for AnalystID.

Your form could then have a single command button, which would launch the
report. The report would be based on a query that refers back to the form's
listbox selection as a criterion for the value of AnalystID. That criterion
would look something like (actual syntax may vary):
Forms!YourFormName!lstYourListBoxName

Or have I assumed too much?
 

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


Top