ChrisLayfield
Registered User.
- Local time
- Yesterday, 23:40
- Joined
- May 11, 2010
- Messages
- 55
I am working on a project where two independent reviews screen literature (study) within a form. I created a combobox to allow the user to select the study, but can only select a study which they have not already reviewed and where the study was not already reviewed by two other people. For some reason, this is no longer pulling the data from the tables and the combobox is just showing empty columns and a box appears to request data entry for each field.
Code:
If rsEmptyTable.EOF = True And rsEmptyTable.BOF = True Then
Me.cboTitle.RowSourceType = "Table/Query"
Me.cboTitle.RowSource = "SELECT tblReferences.[ID], tblReferences.[StudyTitle], tblReferences.[Abstract] " & _
"FROM tblReferences;"
Me.cboTitle.BoundColumn = 1
Me.cboTitle.ColumnCount = 3
Me.cboTitle.ColumnWidths = "0;2 in;0"
Else
Me.cboTitle.RowSourceType = "Table/Query"
Me.cboTitle.RowSource = "SELECT tblReferences.[ID], tblReferences.[StudyTitle], tblReferences.[Abstract], " & _
"tblScreening.[ArticleID], tblScreening.[ReviewerID], Count(tblScreening.[ArticleID]) as Tally " & _
"FROM tblReferences as p " & _
"LEFT JOIN tblScreening as i ON " & _
"p.[ID] = i.[ArticleID] " & _
"WHERE tblScreening.[ReviewerID] <> " & gsUserID & " AND " & _
"Tally < 2;"
Me.cboTitle.BoundColumn = 1
Me.cboTitle.ColumnCount = 6
Me.cboTitle.ColumnWidths = "0;2 in;0;0;0"
End If