Wacko2019 wrote:The one Daan came up with resolved into the same one I already tried, 4 records containing faciliteitnr 1

thats true, but you know that the "accommodations" that are returned have got "accommodation_facility" 1 and 7 !
you can use a seperate query to query the facilities.
On top of that, it's possible that you get more facilities back that way, when facilities 1,4,5,7,10,14 are available for an accommodation, the accommodation will be returned by the above query! You probably want to display the other facilities available also.

OK ... i really shouldn't be helping you because it looks like your working either for or with a competitor .. but sod it here goes...

From the previous posts i've deducted the following information.

1. You have to tables, 'accommodatie' and 'accommodatie_faciliteit'.
'accommodatie' contains Accommodations and accommodatie_faciliteit contains the facillitys they might have.
2. One accommodation can have more than one entry in the table 'accommodatie_faciliteit', because it can have more facilities. One facility can belong to more than one accmmodation, eg there is more than one hotel with a swimming pool.
3. You want to know all accommodations and all there facilities but only those that have accommodation number 1 and accommodation number 7.

If these 3 assumptions are correct you need to look at your database desing. Point 2 determines that there is a many-to-many relationship between accommodation and facility, the way to properly design that is to use a crosstable containing only you AccoID and you FacID. .There are plenty off articles out there about database design and so called 'normal form'

If any of these assumptions are not correct than one of the previous posts has probably already anserwed your question and the results is just not what you expected.

Ok ... sorry ... i misunderstood a little.
To get an accommodation for which a record exist in accommodation_Facilitie with the value 1 and a record with the value 7 you use the GROUP BY and the HAVING components of your query.
Like so:

SELECT AccomID FROM accommodation_Facilitie GROUP BY AccomID HAVING (FacID = 1 AND FacID = 7)

The group by component makes 'groups' of all the rows in your table with (in this case) the same AccomID. The HAVING component looks into this group to see what values are present.

You'll have to figure out the specifics of the join yourself but i hope i'm pushing you in the right direction here.

- I'm working in the 'travel & leisure' industry as they say, competitor is a big word and anyway i don't care. it's alright.... i wuz juzt playin

To bad, this also doesn't work, i've tried several combinations with Group By and Having............................I also made sure that the referential integrity of the tables was good (a.accommodatiecode = b.accommodatiecode and b.faciliteitnr = c.faciliteitnr).

So if anyone else think's he knows the answer......please post it.....i'm still in need of it.

Repost your question using pseudo-names that are easier to read. I can't be bothered trying to decipher your layout. Example:
I have a table A, and a table B. I want to extract A.thisField and B.thatField where A.theOtherField is the same as B.theMatchingField. Then I'll have another look and tell you what the problem is!