![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need to use the following query to fill a subform in Access and I want to to limit the records returned to the latest 'version_no'. It was all working fine until I added the 'Policy.unique_record_number' column to the query, after which it began to return all records. How can I prevent this from happening? SELECT DISTINCT Policy.unique_record_number, Policy.policy_no, Max(Policy.version_no) AS MaxOfversion_no, Policy.insured_id, Organisation.organisation_name, Organisation.organisation_alias FROM Policy INNER JOIN Organisation ON Policy.insured_id = Organisation.organisation_id GROUP BY Policy.unique_record_number, Policy.policy_no, Policy.insured_id, Organisation.organisation_name, Organisation.organisation_alias; |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Many Thanks Bob It's so easy when you know how isn't it? Colin |
![]() |
| Thread Tools | |
| Display Modes | |
| |