|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Greeting,
I have a subform of a main form, that records "bloodPressure" of a patient, the table that the subform uses has 3 feilds, "BloodPressureID", "TodayDate" and "BloodPressure" , Now when i print a report, i have only one field for the "bloodPressure" where i want to show only the last record, i don't want to show all the previous record, how do i tell the report to print only the last entry in that BloodPressure Table ? Thanks |
|
#2
|
|||
|
|||
|
Change the recordsource for your report to a query and select the top record only. A sample SQL statement...
SELECT TOP 1 BPReadings.PatientID, BPReadings.BloodPressureID, BPReadings.TodayDate, BPReadings.BloodPressure FROM BPReadings ORDER BY BPReadings.PatientID, BPReadings.BloodPressureID DESC; Look up "Show only the high or low values in a query" in the help files for more details. |
|
#3
|
|||
|
|||
|
Thanks for the reply,
My confusion is, i have more then one table in my report, so my sql statement keep giving me worng syntex, here is a sample of what i 've done eg: SELECT TOP 1 BloodPressureID, TodayDate, BloodPressure, feildTable1, ,,,more feilds FROM tblBloodPressure , tblTables1, tblTable2 ORDER BY BloodPressureID DESC; Any clues, ?? Thanks again |
|
#4
|
|||
|
|||
|
I believe that to you the top syntax you need to specify how the tables are joined.
Create you query using the query design builder S- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > display only the last record |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|