coasterman
Registered User.
- Local time
- Today, 06:47
- Joined
- Oct 1, 2012
- Messages
- 59
I have a main form with a number of subforms one of which is a continuous form for adding keywords about the parent record. There is a many to many relationsip between the two tables.
I then Select the parent records by an SQL Inner Join (FK of the keyword added from combo on mainfrm) and that all works fine but its limited to just the one search was is very limiting.
What I dont know how to do is select a second keyword (and so on) to further contsrain the records returned by the first and any subsequent keywords selected - at a guess I need to be able to modify the first SQL statement to append the additional criteria of the FK of the Keyword selected? If correct then I'm not clear on how to write that.
In the attached cut down example 5 of the 10 parent records have 'square' as a keyword - what I would like to be able to do is select say 'circle' and only have the 1 record where 'circle' and 'square' appear rather then the 3 records where 'circle' appears as a keyword. I should mention that due to the subject matter the users wont always know what their 2nd and 3rd choices will be and are likley to be guided by the 'whats left' portion. There are likely to be 100's of keywords as the parent record count increases so a method by which the combo box could display only what is availble (after the first keyword is selected) would be a fantastic addition if thats even possible?
I then Select the parent records by an SQL Inner Join (FK of the keyword added from combo on mainfrm) and that all works fine but its limited to just the one search was is very limiting.
What I dont know how to do is select a second keyword (and so on) to further contsrain the records returned by the first and any subsequent keywords selected - at a guess I need to be able to modify the first SQL statement to append the additional criteria of the FK of the Keyword selected? If correct then I'm not clear on how to write that.
In the attached cut down example 5 of the 10 parent records have 'square' as a keyword - what I would like to be able to do is select say 'circle' and only have the 1 record where 'circle' and 'square' appear rather then the 3 records where 'circle' appears as a keyword. I should mention that due to the subject matter the users wont always know what their 2nd and 3rd choices will be and are likley to be guided by the 'whats left' portion. There are likely to be 100's of keywords as the parent record count increases so a method by which the combo box could display only what is availble (after the first keyword is selected) would be a fantastic addition if thats even possible?
Attachments
Last edited: