Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 3rd, 2004, 06:00 AM
Cillies Cillies is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 8 Cillies User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
returning 2 reports from one form

Hi All!

Is it possible to have two reports and be fit to call them from the one form.

I have created two reports, 1 with detailed info and 2 with just totals. (but the latter is not linked up to the form used for calling up the first report.)

The thing is, on my form I can select data by employee and by all employee. which will return info on an individual level and info on all employees

But now I want to select All employees and return a different Report, one with the totals. The one mentioned above 2

I don't know if I can do this! but below I have pasted the VB code to give you a better understanding of what I am talking about.

I.e. I want to select by individual and get report1 and also I want to select All and retrieve a different report.(2)


VB CODE
Option Compare Database
Option Explicit

Private Sub BeginDate_AfterUpdate()
Me!EndDate = Me!BeginDate
Me!EndDate.SetFocus
End Sub


Private Sub cboEmployeeName_AfterUpdate()
If Me!cboEmployeeName = "*" Then
Me!chkAllEmployee = True
Else
Me!chkAllEmployee = False
End If
End Sub


Private Sub chkAllEmployee_AfterUpdate()
If Me!chkAllEmployee Then
Me!cboEmployeeName = "*"
Else
Me!cboEmployeeName = Null
Me!cboEmployeeName.SetFocus
End If
End Sub

Private Sub chkAllDates_AfterUpdate()
If Me!chkAllDates Then
Me!BeginDate = DMin("DateWorked", "[Time Card Hours]")
Me!EndDate = DMax("DateWorked", "[Time Card Hours]")
Else
Me!BeginDate = Null
Me!EndDate = Null
Me!BeginDate.SetFocus
End If
End Sub

Private Sub cmdPreview_Click()
DoCmd.OpenReport "IMMREPORTALL", acViewPreview
End Sub

Private Sub Form_Activate()
DoCmd.Restore
End Sub

Private Sub Form_Load()
Me!BeginDate = DMin("DateWorked", "[Time Card Hours]")
Me!EndDate = DMax("DateWorked", "[Time Card Hours]")
End Sub
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click


DoCmd.Close

Exit_cmdClose_Click:
Exit Sub

Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click

End Sub



I hope some one can help
Kindest Regards
Cillies

Reply With Quote
  #2  
Old March 3rd, 2004, 09:40 AM
supersubra's Avatar
supersubra supersubra is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Coimbatore, India
Posts: 280 supersubra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 15 m 10 sec
Reputation Power: 6
There are so many ways to do open any number of reports based on the criteria selection in the form or all criteria text box set to default value and select a summary report directly.

One simple method is you can Place a frame object (Radio button) with multiple report options 1.Detail 2.Summary 3.etc etc
and based on the framevalue open different reports on cmdpreview button click event

select case me!framename
case is = 1
docmd.openreport "detail...."
case is = 2
docmd.openreport "summary...."
case else
end select
__________________
V.Subramanian

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > returning 2 reports from one form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT