I have a main query from an access database, like this, it works fine.
Expand|Select|Wrap|Line Numbers
- description=Request("titleimagesix")
- If description <> "" Then
- SQLQuery="Select tblGreetingcategories.categoryname,tblGreetingpostcards.categoryid,tblGreetingPostCards.titleimagesix,tblGreetingPostCards.NewImagesix from tblGreetingcategories,tblGreetingPostCards Where tblGreetingcategories.categoryid = tblGreetingpostcards.categoryid and titleimagesix='" & replace(description ,"-"," ") & "' "
Below this result i want to also list all other records that can be found with the same categoryid as the above query. I have the code below but it returns all results and not those only related to the above query. I imagine its something like adding where titleimagesix=categoryid but of course i dont know how to write it or indeed if thats right at all. Or if i need to include the main query in this one.
Expand|Select|Wrap|Line Numbers
- SQLQuery="Select tblGreetingcategories.categoryid,tblGreetingpostcards.categoryid,tblGreetingPostCards.titleimagesix,tblGreetingPostCards.NewImagesix from tblGreetingcategories,tblGreetingPostCards Where tblGreetingcategories.categoryid = tblGreetingpostcards.categoryid "
Richard