473,382 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

View Reports from from listbox or dropdown

DD
Hi
I want the user to be able to view all reports from a form either by
way of a list box or dropdown or ??
any help please

DD
Nov 12 '05 #1
7 2918
DFS
Your list or dropdown rowsource:

SELECT [Name] FROM MSysObjects WHERE [Type] = -32764 ORDER BY [Name];
"DD" <da**********@bigpond.com.au> wrote in message
news:14**************************@posting.google.c om...
Hi
I want the user to be able to view all reports from a form either by
way of a list box or dropdown or ??
any help please

DD

Nov 12 '05 #2
View Reports from from listbox or dropdown
Ok, the user creates a new rpt from the wizard,the backend is hidden.
Now i want the new rpt "whatever name to populate in the list box,,or
give access to the user to all the rpts and they choose their new rpt.
All this is done via a form

big job or what?
DD
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Little job: you pick up the name of the report from the combo or list box in
its AfterUpdate event and use it in a DoCmd.OpenReport. That is, unless you
have reports, as is often the case, where the user enters values to limit
the number of records in the report -- those are probably going to require
that you create a separate form for each and open that form, so the user can
enter the limiting values, and then you execute a DoCmd.OpenReport from that
form.

Larry Linson
Microsoft Access MVP

"David Deacon" <da**********@bigpond.com.au> wrote in message
news:3f***********************@news.frii.net...
View Reports from from listbox or dropdown
Ok, the user creates a new rpt from the wizard,the backend is hidden.
Now i want the new rpt "whatever name to populate in the list box,,or
give access to the user to all the rpts and they choose their new rpt.
All this is done via a form

big job or what?
DD
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4
DFS
"David Deacon" <da**********@bigpond.com.au> wrote in message
news:3f***********************@news.frii.net...
View Reports from from listbox or dropdown
Ok, the user creates a new rpt from the wizard,the backend is hidden.
Now i want the new rpt "whatever name to populate in the list box,,or
give access to the user to all the rpts and they choose their new rpt.
All this is done via a form
If they can use the Report Wizard, the database window is open, right? So
they
already have Access to all the reports and there's no need for a form.

big job or what?
DD
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Nov 12 '05 #5
bo*****@localhost.not (Larry Linson) wrote in
<qx***************@nwrddc02.gnilink.net>:
Little job: you pick up the name of the report from the combo or
list box in its AfterUpdate event and use it in a
DoCmd.OpenReport. That is, unless you have reports, as is often
the case, where the user enters values to limit the number of
records in the report -- those are probably going to require that
you create a separate form for each and open that form, so the
user can enter the limiting values, and then you execute a
DoCmd.OpenReport from that form.


There's hardly ever a case where you should need to do that.

The best way to collect filter information from a form for a report
is to open that form as a dialog in the form's OnOpen event and
change the recordsource. This makes it possible to have a single
dialog form that is used for multiple reports. It also means the
dialog form doesn't have to know anything about any of the reports
it is used for.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #6
"David W. Fenton" wrote
That is, unless you have reports, as is often
the case, where the user enters values to limit
the number of records in the report -- those
are probably going to require that you create
a separate form for each and open that form,
so the user can enter the limiting values, and
then you execute a DoCmd.OpenReport
from that form.


There's hardly ever a case where you should
need to do that.

The best way to collect filter information from
a form for a report is to open that form as a
dialog in the form's OnOpen event and
change the recordsource. This makes it possible
to have a single dialog form that is used for
multiple reports. It also means the dialog form
doesn't have to know anything about any
of the reports it is used for.


That's a good approach and it'll work if you have a number of reports all
limited by the same data... for example, dates. If you have other "selection
factors", you will either need other dialog forms, or you'll need to pass
information to the form to be displayed in lieu of labels. And, in most
applications I've worked on, there were a limited number of reports with the
same limiting/filtering data -- a few using a date range, others using a
geographic filter, some using a corporate structure selection, etc.. So,
while you could not conveniently get by with one "selection form", you could
get by with a few of them.

I suppose you could get by with one, if you did a good deal of code to
communicate between the Report and the Form, to display the proper number of
text boxes, or combo boxes, and the correct labels, etc., as well as to
retrieve the appropriate data and build the record source. But, generally, I
find it easier to maintain more forms and less complex code.

I worked on one system that had a "standard" selection form, but in an
attempt to simplify, they had put so much on that form that the code to
massage it for a given report was complex. And, too, not all the possible
entries were applicable for all the reports. The designers should have put
more thought, and more forms, into the process and it would have cut way
back on the processing and VBA code, and _maintenance_ time and effort
required. The information was picked up, validated, and processed in the
Open event of the Reports, BTW.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #7
bo*****@localhost.not (Larry Linson) wrote in
<1t***************@nwrddc01.gnilink.net>:
"David W. Fenton" wrote
That is, unless you have reports, as is often
the case, where the user enters values to limit
the number of records in the report -- those
are probably going to require that you create
a separate form for each and open that form,
so the user can enter the limiting values, and
then you execute a DoCmd.OpenReport
from that form.
There's hardly ever a case where you should
need to do that.

The best way to collect filter information from
a form for a report is to open that form as a
dialog in the form's OnOpen event and
change the recordsource. This makes it possible
to have a single dialog form that is used for
multiple reports. It also means the dialog form
doesn't have to know anything about any
of the reports it is used for.


That's a good approach and it'll work if you have a number of
reports all limited by the same data... for example, dates. If you
have other "selection factors", you will either need other dialog
forms, or you'll need to pass information to the form to be
displayed in lieu of labels. And, in most applications I've worked
on, there were a limited number of reports with the same
limiting/filtering data -- a few using a date range, others using
a geographic filter, some using a corporate structure selection,
etc.. So, while you could not conveniently get by with one
"selection form", you could get by with a few of them.


Well, re-usability is only a secondary benefit of my suggestion.
The main benefit is making the opening of the report a unified
event, that you don't have to know "Oh, gee, I have to open that
report with this *form* instead of just opening the report."
I suppose you could get by with one, if you did a good deal of
code to communicate between the Report and the Form, to display
the proper number of text boxes, or combo boxes, and the correct
labels, etc., as well as to retrieve the appropriate data and
build the record source. But, generally, I find it easier to
maintain more forms and less complex code.
I have plenty of applications where these dialog forms get
repeatedly re-used. I have never used "adaptable" dialogs that
would enable/disable or show/hide particular criteria depending on
the report, because then you're breaking the implicit rule behind
the benefit of re-use, that the form needs to know nothing about
the report it is being used with.

If I *were* going to re-use a dialog and dynamically reformat it,
I'd definitely wrap the whole thing in a class module and use it as
the storage system for the data collected.
I worked on one system that had a "standard" selection form, but
in an attempt to simplify, they had put so much on that form that
the code to massage it for a given report was complex. And, too,
not all the possible entries were applicable for all the reports.
The designers should have put more thought, and more forms, into
the process and it would have cut way back on the processing and
VBA code, and _maintenance_ time and effort required. The
information was picked up, validated, and processed in the Open
event of the Reports, BTW.


I generally think it's worth it to code the dialog into the OnOpen
event (though you might want to have a bypass if the report's
filter is not zero-length, which would mean that it's being opened
with a WHERE clause) even if the dialog is used only once, simply
because it makes the dialog a "child" object of the report, rather
than the other way around. It also leaves open the possibility of
re-using the dialog, something that is much harder the other way
around.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Deacon | last post by:
View Reports from from listbox or dropdown Ok, the user creates a new rpt from the wizard,the backend is hidden. Now i want the new rpt "whatever name" to populate in the list box,,or give access...
2
by: David Deacon | last post by:
OK I have not explained myself properly. 1. i have created a form with a btn the user clicks the btn and opens the default Microsoft LabelWizard the tbl the user draws the information from is...
7
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? ...
5
by: Kay | last post by:
Hello, I have two list boxes on my form, one initially displays with items and the other displays blank, by clicking a button, it is possible to move items from one box to another and vice a...
1
by: JIM.H. | last post by:
Hello, I have a data view linked to a table and a dropdown list for “LastName”. Now once I select something from dropdown list I want the data view refresh itself for selected LastName. I do...
1
by: acord | last post by:
Hi, I am having problem to get a value of the selected item from a dropdown listbox. Here is the JS function; function getSelectedItem(objSelect) { alert("in getSelectedItem"); alert...
3
by: Renilkumar | last post by:
Hi, I am using .net 2.0. I have a .aspx page with vb.net as codebehind. My form has one dropdown, 2 listboxes with add & remove button. During pageload I am loading all the values from the db to...
7
by: google | last post by:
I am trying to automate the way reports are printed in an Access 2003 database - I have ~200 records (people) who require between 5 and 10 customized reports (depending on values within certain...
11
tuxalot
by: tuxalot | last post by:
I have reports visible in a listbox on a tabbed form. The Row Source for the listbox is: SELECT .ReportID, .ReportName, .ReportCaption, .ReportCriteriaFlags FROM ORDER BY .ReportCaption; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.