You'll need to write another query to return the max test date for each student then join this into your existing query (qry_rpt_studentregistered1) or in the SQL above to limit the rows returned, eg:
qMaxDates:
select sutdentID, max(testDate)
from myData
group by studentID Best Regards,
Mike
You should use transferspreadsheet rather than transfertext but unfortunately you can't specify a range with this method when exporting :-)
If its an option it might be better to pull the data from the excel side. you should be able to control where the data ends up this way. Best Regards,
Mike
I don't think you can do this in one go. You need to write 3 queries, one each to count the rows in the 2 tables and a third to do the division, ie:
Q1: select count([Visit No]) as Visits from tableA
Q2: select count([Test Drive No]) as Drives from tableB
Q3: select Drives/Visits as myRatio...
You could try it a different way. Add a (hidden) column to your query as Month(myDate). In your combo box just put 1,2,3,4 etc in the secound column, ie col(1). Then use the
same syntax for your criteria line:
[Forms]![frmReportDept]![2ComboMonth].[Column(1)]
Out of interest don't you need to...
Tekila
The
[CSRName]= '" + Me.agentselect + "'"
part is a where clause applied to the results of the reports underlying query. Best Regards,
Mike
I think your problem is that you have not defined a value when PPDepPaid is false, in this case you iif returns NULL and if you try to sum across a mix of nulls and numerics you will get NULL. Try this:
=IIf([PPDepPaid]=-1,[ParkingDepositPrice],0)
and then in the footer...
Short answer, you can't. Not that I'm aware of anyway. When you need this you have to do it in two steps.
Q1:
select distinct colname from x
Q2:
select count(colname) from Q1 Best Regards,
Mike
Try this:
Private Sub byAgent_Click()
If IsNull(Me.agentselect) Then
MsgBox "Please choose an agent"
Else
DoCmd.OpenReport "printevalbyagent", , , "[CSRName]= '" + Me.agentselect + "'"
End If
End Sub Best Regards,
Mike
You'll need to do this in a module. Write a query that returns the criteria you need to define each report (maybe just customer number in your case). Process this result set
in a loop and open up a report for each customer. You can use the customer number to set the where clause when you open...
I couldn't see you snapshot but I'd guess that you have all your controls in the detail section. Pull all the common controls (eg customer id, name address etc) into the report header section and leave the order specific stuff in the detail (eg part number, quantity, price). Best Regards,
Mike
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.