Report from drop down menu

  • Thread starter RE: VLOOKUP fORMULA
  • Start date
R

RE: VLOOKUP fORMULA

Any body pls help…….?????

I have a table with the following fields:-
Name
Class
Division
Weight
Height
Hobby

I want to make a report by selecting some names from the table by using a
drop down menu.
And total the weight down below.

For example.

Name Class Div Weight
Raju XI D 55
Ramu XI D 56
Balu X A 55
-----------------------------------------------------
166
=================================

Just explain a structure what type of query should make then I will try to
make.

Thanks
 
A

Allen Browne

You don't need a query. Use the wizard to create a report based on your
table, and select the fields you want to show.

To sum the Weight column, add a text box to the Report Footer section (in
report design view), and set the Control Source property of the text box to:
=Sum([Weight])

Note that many common words can cause you grief as field names, and 3 of
yours are in that list: Name, Class, Height. Details:
http://allenbrowne.com/AppIssueBadWord.html
 
K

KARL DEWEY

One way would be to have an unbound combo on a form that you select names and
that sets a flag used as criteria. Then a Run button for the report and rest
the flags.
 
H

HKKS

Could you clarify a few things.

1. How have you designed the drop down menu? In a form with a combo boxes
with the row source as last name?
2. I assume that you just have to select the last name and all the other
details come up in a report?
3. I also assume that you just have one table that has all the information
and none of the info is a running total (such as weight, which may change and
you want to record the changes). Regardless, a query to pull up all the names
from your table is a must.
4. All this info will be displayed in a report, either on screen or in
printed format.
5.

One way is to put a text box into your report. You may want to right click
and click on Sorting and Grouping to add a header that addresses only the
total. Then, go to Build Event and find =SUM under FUNCTIONS. But you can
just type in " =Sum([Queryname]![FieldName])

This will display a sum of all the names that were selected in the original
pull down menus that you made.

I hope this helps.
 
R

RE: VLOOKUP fORMULA

Dear Allen,

I think the way i asked my question is not clear.

Let me explain again.

I have a table with ie.. 50 names of students with their respective details
as shown below

I like to select around 5 names from the table (using a form) and print a
report with all the 10 names as shown below:-

Name1/Class/Division/Weight
Name2/Class/Division/Weight
Name3/Class/Division/Weight
Name4/Class/Division/Weight
Name5/Class/Division/Weight
---------------------------------
Total Weight =
---------------------------------

To sum the weight I already understood from your below, thanks.

I will be appreciated if just give an idea how to do it.

Thanks.......



Allen Browne said:
You don't need a query. Use the wizard to create a report based on your
table, and select the fields you want to show.

To sum the Weight column, add a text box to the Report Footer section (in
report design view), and set the Control Source property of the text box to:
=Sum([Weight])

Note that many common words can cause you grief as field names, and 3 of
yours are in that list: Name, Class, Height. Details:
http://allenbrowne.com/AppIssueBadWord.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


RE: VLOOKUP fORMULA said:
Any body pls help…….?????

I have a table with the following fields:-
Name
Class
Division
Weight
Height
Hobby

I want to make a report by selecting some names from the table by using a
drop down menu.
And total the weight down below.

For example.

Name Class Div Weight
Raju XI D 55
Ramu XI D 56
Balu X A 55
-----------------------------------------------------
166
=================================

Just explain a structure what type of query should make then I will try to
make.

Thanks
.
 
A

Allen Browne

Okay, you will need a form where the user can select the names, and click a
button to open the report.

The name selector could be an unbound multi-select list box.
Here's an example:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html

Alternatively, you could provide several unbound text boxes (or combos), and
build the filter string from that.

Alternatively, you could add a yes/no field to your table, so you can add a
check box to a continuous form, check the box for the records you want, and
then use that as the filter for the report. If you call the field IsPicked,
the code for the button would look like this:
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False 'Save first
strWhere = "[IsPicked] = True"
DoCmd.OpenReport "Report1", acViewPreview , , strWhere

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


RE: VLOOKUP fORMULA said:
Dear Allen,

I think the way i asked my question is not clear.

Let me explain again.

I have a table with ie.. 50 names of students with their respective
details
as shown below

I like to select around 5 names from the table (using a form) and print a
report with all the 10 names as shown below:-

Name1/Class/Division/Weight
Name2/Class/Division/Weight
Name3/Class/Division/Weight
Name4/Class/Division/Weight
Name5/Class/Division/Weight
---------------------------------
Total Weight =
---------------------------------

To sum the weight I already understood from your below, thanks.

I will be appreciated if just give an idea how to do it.

Thanks.......



Allen Browne said:
You don't need a query. Use the wizard to create a report based on your
table, and select the fields you want to show.

To sum the Weight column, add a text box to the Report Footer section (in
report design view), and set the Control Source property of the text box
to:
=Sum([Weight])

Note that many common words can cause you grief as field names, and 3 of
yours are in that list: Name, Class, Height. Details:
http://allenbrowne.com/AppIssueBadWord.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


in
message news:[email protected]...
Any body pls help…….?????

I have a table with the following fields:-
Name
Class
Division
Weight
Height
Hobby

I want to make a report by selecting some names from the table by using
a
drop down menu.
And total the weight down below.

For example.

Name Class Div Weight
Raju XI D 55
Ramu XI D 56
Balu X A 55
-----------------------------------------------------
166
=================================

Just explain a structure what type of query should make then I will try
to
make.

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

Top