Charts

Stemdriller

Registered User.
Local time
Today, 06:20
Joined
May 29, 2008
Messages
187
Hi all

This is an old post that I still cannot resolve, and was hoping for some input.

The main query does a count of various options on a Customer Satisfaction Survey.

I created a blank form, unbound and placed a chart within it based on the query, when the query fires it asks 3 Questions, What Reason, Department and Category, on the form I then have to Maximise the screen to trigger showing the chart, it is blank until i do this??

If I try and Print the Chart, I then get asked the same 3 questions and then when I select the Printer it asks me again, so that’s 3 times????

The end result however is OK.

Regards
GW
 

Attachments

Just DL'ed the DB. what's the name of the form you're having trouble with?
 
I get an OLE error - guess my copy of Access isn't compatiable....
 
You've already been advised in a previous thread to use an unbound pop-up form with textboxes to collect the user's input, but you seem to have completely ignored that solution.

There's no bypassing it from prompting as many times as it wishes.

http://www.access-programmers.co.uk/forums/showthread.php?t=204493

I didn't ignore your advice, I tried and I tried and I tried, I huffed and I puffed but alas I failed!!!!

Just thought a more experienced eye having the DB in front of them may help. I never ignore the advice this forum gives.

GW
 
1. Open the pop-up form
2. Get the user's input
3. Hide the form
4. Open the report

Instead of using [Enter Rating] as a parameter you simply use a full reference to the textbox in the hidden form [forms]![FormName]![RatingControlName]

Even if it was to request that field three times it knows where to get it from.

5. Close the hidden form in the Close event of the report.
 
vbaInet

I made an early start this morning, got to work early with renewed vigour!

And it only chuffing worked!!!

Chuffing chuffing chuff chuff

I'm well chuffed

Many Many Thanks vbaInet

Gareth
 
vbaInet

I thought it best to place the Chart onto another form rather than direct to the Report, then allow the user to print the report if required, or do other things within the Database.

It all works ok apart from when the new form fires up I have to either to right click or maximise the screen for the chart to show, whereas the report just shows the chart. Obviously I need the chart to show as soon as the form loads.

Any Ideas??

GW
 
Can you not maximize the window in code?

Docmd.selectobject acform, "Form Name"
Docmd.Maximize

You could also check that the Auto Resize property is set to Yes.
 
Hi Thanks for replying.

I got around this by simply placing a button on the form name 'Click to view Chart' once clicked the chart is displayed, but I will try your solution.

I have attached the database thus far, as they now want to be date specific. eg Just see results from 01/01/2011 to 10/01/2011. In the query I tried 'Between [Date in] and [Date out]' but the query seems to omit this and just total the whole fields.

I just need it to count for the days specified.

run frmChartInput then qryMain or frmChartResults. Entering 'Customer' and TurboGenerators' and 'Health' for 07/02/2011 should only show 1 result not 2.:confused:

Any advise would be most appreciated.

Thanks

GW
 

Attachments

I don't have time now to start testing and troubleshooting.

Let's see the SQL statement of your query.
 
Re the problem as stated in post #11.

Access 2007 and later does have a problem showing charts without human intervention.

In this thread you will find a demo which contains the following code: -
Code:
Private Sub chtTestChart_Updated(Code As Integer)

    If (conHandleErrors) Then On Error GoTo ErrorHandler

    [color=green]' Required for Windows 7.
    ' First set focus to the chart and then to another control.[/color]
    Me.chtTestChart.SetFocus
    Me.cmdDummySetFocus.SetFocus

ExitProcedure:
    Exit Sub

ErrorHandler:
    DisplayError "chtTestChart_Updated", Me.Name
    Resume ExitProcedure

End Sub

HTH.

Chris.
 
SELECT ([ReasonLu]) AS Reason1, DCount("Ratings","tblRatings","Ratings= 1 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]) AS Poor, DCount("Ratings","tblRatings","Ratings= 2 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]) AS Fair, DCount("Ratings","tblRatings","Ratings= 3 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]) AS Good, DCount("Ratings","tblRatings","Ratings= 4 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]) AS [Very Good], DCount("Ratings","tblRatings","Ratings= 5 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]) AS Excellent, tblCustomerDetails.DateOfVisit
FROM LuReason INNER JOIN (LuDept INNER JOIN tblCustomerDetails ON LuDept.DeptID = tblCustomerDetails.Dept) ON LuReason.ReasonID = tblCustomerDetails.Reason
GROUP BY ([ReasonLu]), DCount("Ratings","tblRatings","Ratings= 1 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]), DCount("Ratings","tblRatings","Ratings= 2 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]), DCount("Ratings","tblRatings","Ratings= 3 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]), DCount("Ratings","tblRatings","Ratings= 4 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]), DCount("Ratings","tblRatings","Ratings= 5 and LuReason = " & [Forms]![frmChartInput]![cmbReason] & " and Dept = " & [Forms]![frmChartInput]![cmbDept] & " and Category = " & [Forms]![frmChartInput]![cmbCat]), tblCustomerDetails.DateOfVisit
HAVING (((tblCustomerDetails.DateOfVisit) Between [date From] And [Date To]));
 

Users who are viewing this thread

Back
Top Bottom