Custom Report

scouser

Registered User.
Local time
Today, 16:21
Joined
Nov 25, 2003
Messages
767
Guys 2 questions:
1) Report is generated froma query 'Service Schedule' criteria = Date()+1 Prints all service scedules for the following day?

Can I amend this query to show schedule for 1,2,3 days in advance on the same report?

2) When button is clicked to generate the report can I tell it to display a custom report if the main report contains no data?
i.e. No services scheduled so all fields on the form are blank. Instead of showing blank fields my 'Custom Report' opens displaying a friendly message!!

Searched the forum but could't find this (go on . prove me wrong!!)
Thanks in advance,
Phil.
:D
 
On the NoData event in your report, have the code either display a messagebox or have it open a report.
As for your first question I am not savy enough to help you there.
 
scouser said:
Guys 2 questions:
1) Report is generated froma query 'Service Schedule' criteria = Date()+1 Prints all service scedules for the following day?

Can I amend this query to show schedule for 1,2,3 days in advance on the same report?

:D

To show schedule for the next 3 days put this in the criteria section of the query builder:

Between Date() + 1 And Date() + 4
 
Thanks Guys

Thanks for taking the time to respond.
I will put your thoughts into practice!!
 
One More

Guys, I am no coder! When I click the 'Service Schedule' button on the frmMainMenu it is told to open the rprtServiceSchedule:

Code:
Private Sub ServiceSchedule_Click()

On Error GoTo Err_ServiceSchedule_Click

    Dim stDocName As String

    stDocName = "rprtServiceSchedule"
    DoCmd.OpenReport stDocName, acPreview
    DoCmd.Maximize
    
Exit_ServiceSchedule_Click:
    Exit Sub

Err_ServiceSchedule_Click:
    MsgBox Err.Description
    Resume Exit_ServiceSchedule_Click
    
End Sub

Problem: The rprtServiceSchedule is based on a query. Telling it to run the query before opening the report won't do the trick?

Should i change the query type? If so to what? An update Query?

All help / advice welcome!
Phil.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom