spartansFC
Programmer
Hi
I've used this method loads of times to open reports etc but for some reason i'm doing something wrong and i can't figure out why.
I've created a list box which lists all my reports, i double click on the report name and the report opens. On the report i'm working on, i have a form which opens up before the report so that i can add from and to dates, there's a preview button on that pop up form which when you click is supposed to then open the report.
I've messed around abit trying to figure out what is going on and i don't think the queries are getting passed through to the report or something else is going on.
I've attached a jumbled screen shot of what happens, the grey box on the right hand side is what happens at the minute when the report is displayed.
When you double click on the report in the list box, a macro is called up where:
The action is : Open Report
The report name is: =[Forms]![frmViewReports]![lstReferralReports]
View is: print preview
the code below is on the open event of the report so that the pop up form kicks in:
When you click the preview button the code is:
The report is made up of a unbound main report with a few sub reports as it’s a summary report, age and gender profiles etc. I did originally have the date selection boxes on my main menu with just a command button that called the report up which worked fine, but since updating the database, i've changed a few things, but i've used this method before and never had this problem.
Any ideas
thanks
Mikie
I've used this method loads of times to open reports etc but for some reason i'm doing something wrong and i can't figure out why.
I've created a list box which lists all my reports, i double click on the report name and the report opens. On the report i'm working on, i have a form which opens up before the report so that i can add from and to dates, there's a preview button on that pop up form which when you click is supposed to then open the report.
I've messed around abit trying to figure out what is going on and i don't think the queries are getting passed through to the report or something else is going on.
I've attached a jumbled screen shot of what happens, the grey box on the right hand side is what happens at the minute when the report is displayed.
When you double click on the report in the list box, a macro is called up where:
The action is : Open Report
The report name is: =[Forms]![frmViewReports]![lstReferralReports]
View is: print preview
the code below is on the open event of the report so that the pop up form kicks in:
Code:
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "frmMonitoringDatesSelection", , , , , acDialog, "Monitoring Report"
If Not IsLoaded("frmMonitoringDatesSelection ") Then
Cancel = True
End If
End Sub
When you click the preview button the code is:
Code:
If IsNull([txtboxSummaryStartDate]) Then
MsgBox "You must enter a Start Date"
DoCmd.GoToControl "txtboxSummaryStartDate"
Else
Me.Visible = False
End If
End Sub
The report is made up of a unbound main report with a few sub reports as it’s a summary report, age and gender profiles etc. I did originally have the date selection boxes on my main menu with just a command button that called the report up which worked fine, but since updating the database, i've changed a few things, but i've used this method before and never had this problem.
Any ideas
thanks
Mikie