简体   繁体   中英

creating a query from multiple tables in access

I have an issue with designing a query I could do with some help with. I have three tables (there is more but these should do for this):

  • Game Review
  • Reviewer
  • Game

I need a query that will only select games that the reviewer has not reviewed (if that makes any sense).

Any ideas? It's to populate a box on an add-review form so that when a reviewer has been selected, the next drop-down will only show games that have not been reviewed yet by that reviewer

Further info: game review and reviewer contain a reviewer ref field, game review and game contain a game ref field

SELECT Game.*, [Game Review].*
FROM Game LEFT JOIN [Game Review] ON Game.[Game Ref] = [Game Review].[Game Ref*]
WHERE [Game Review].[Reviewer ref*] IS NULL;

i think this doesnt work because im getting the data from a text box in the form ie

[Forms]![FRM_Add_review_form]![reviewercombo]

I'm making some asumptions because I don't have all the field names, but it would be something like this:

SELECT Game.*, GameReview.*
from Game
Left Join GameReview 
on Game.GameID = GameReview.GameID
WHERE GameReview.Review IS NULL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM