Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print by ID?? Help

Status
Not open for further replies.

fule12

Programmer
Nov 12, 2001
140
0
0
YU
Hi to All,
I make forms Orders where in header I have combo box(VesselId), so when user select Vessel from combo box, in details of form he enter data for that vessel and act, act .The subform show all records( orders) for that Vessel. My question is : " how to make report for each Vessel or for all Vessel's ?
Thanks Fule
 
I'm not into the programing for these tasks. What I do is create a query with all the fields needed for the report.
In the field you want to reference put Like in the criteria. You can add Like [Enter a Vessel] Or
Like [Enter The first few letters and an *]
Create your report and in the Record Source put the name of the query. When you open the report it will ask for the name of the Vessel and display the results.
Jim
 
Hi Jpeneh10,
Thanks for Replying
I'm new in access so if is not to hard for you to give me litle longer explanation how to make this
Thanks Fule
 
Hi Fule,
In database view click on query, click new,click simple query.
When the wizard appears click "tables or queries" and select the table you want. Move the fields required for the report to the "selected fields" box and click "next" if you need summaries click "summaries" and click in check boxes.
if you don't need summaries click finish.
Click design view and in "criteria" box for the Vessel name enter:
Like
or
Like [Enter a Vessel}
or
Like [Enter the first few letters and an *]
If you enter a complete name in the "Enter Parameter Value" box as it is in your field results will appear. If you enter a partial name then you need the asteris to complete the name.
Create your report(or form) and in design view make the record source the query you just created. When the report or form opens the "Enter Parameter Value" box will appear. Enter the name of the ship.
Hope this helps.
Jim

 
thanks Jpeneh10 you help me lot, but if i wont to make report for all Ship, can i use same query or i nead to make new?
Fule
 
Morning,
All you need to do is enter a * in the "Enter Parameter Value" and it will give you the results for all.
Jim
 
MEN THANKS A LOT BUT I HAVE 1 MORE
question :(
when i make query how to set to give me record up to 31 of mounth. if i make in field
Order Date criteria [enter date] is give me record up to date what i entered , but i 'm let sey inrested for date up to 31/9/01 and bifore?
do i nead to make Craiteria form?
Fule
 
Fule,
I would make a new query with all the fields you need and in the Criteria for the date put
>#1/1/2002# And <#4/1/2002# or any combination of dates you need.
The above will give results from Jan 2, 2002 up to and including March 31, 2002.
Or you could use between in the criteria.
Put &quot;Between [Enter Begin date] And [Enter end date]&quot; (without the quotes) in the criteria of the date field in the query.
Again if you enter the dates in the &quot;enter parameter value&quot; prompt as above you should get the results.
 
Hi:
Give it a try:
Reports in Access have semelar princepals as Forms.
Since you delt with Form Subform, I think you can do the same with reports.
Create Main Report (use same query as your Main Form).
Create SubReport (use same query as your SubForm).
On your Main Report, add your SubReport and set the Link Chiled & Parent Fields.
On your Main Form Footer, add a command button to generate your report. (Edit the Code of the button &quot;On Clik Event Procedure&quot; and add the prober code.
At First It will look like :
Your report name
stDocName = &quot;Sectors_Dueties_List_ByJob_Report&quot;
DoCmd.OpenReport stDocName, acPreview
Add the line between astress after acPreview
your filter from your own main form
*, , &quot;Sector_Code =Forms!Sector_Jobs_Dueties_Main0_Form!combo16&quot;*

Hope, it will help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top