ChrisLayfield
Registered User.
- Local time
- Today, 18:39
- Joined
- May 11, 2010
- Messages
- 55
I have a reference database, where the references need to be screened by two independent reviewers. I need the references to load as the rowsource of a combobox only when the user has not already reviewed the reference or the reference has not been reviewed twice already. I thought I could include a DCount statement within the SQL Select statement, but I can't seem to get it to work out.
Thanks for the help,
Chris
Code:
Me.cboTitle.RowSource = "SELECT tblStudyReferences.[ID], tblStudyReferences.[StudyTitle], " & _
"tblStudyReferences.[Abstract], tblScreening.[ArticleID], tblScreening.[ReviewerID] " & _
"FROM tblStudyReferences, tblScreening " & _
"WHERE tblScreening.[ReviewerID] <> " & gsUserID & " AND " & _
"DCOUNT('tblScreening.[ArticleID]', 'qryReferences', 'tblScreening.[ArticleID]' = 'tblStudyReferences.[ID]') <= 2 " & _
"GROUP BY tblStudyReferences.[ID], tblStudyReferences.[StudyTitle], tblStudyReferences.[Abstract], " & _
"tblScreening.[ArticleID], tblScreening.[ReviewerID] " & _
"ORDER BY tblStudyReferences.[StudyTitle];"
Thanks for the help,
Chris