Code:
SELECT DISTINCTROW tblBugReport.BugNumber, tblBugReport.UserName AS [User], tblBugReport.Summary AS Summary, tblBugReport.Priority AS Priority, tblBugReport.Status AS StatusFROM tblBugReport
GROUP BY tblBugReport.BugNumber, tblBugReport.UserName, tblBugReport.Summary, tblBugReport.Priority, tblBugReport.Status
HAVING (((tblBugReport.UserName)=[Forms]![frmBugs].[txtUserID].[value]));
You need a space between Status and FROM
You don't need "Value" >> [Forms]![frmBugs].[txtUserID].[value]
Should be just : [Forms]![frmBugs].[txtUserID]
Originally Posted by
Datech
I want to make a query to display only bugs submitted by the current user. I've put in a text box that holds the value of the UserID, which is tied to the UserName of who submitted the bug. I'm having no luck getting this filter to work correctly though.
<snip>
<snip>
txtUserID is the text box containing the user name info on the frmBugs form. The code that populates the text box works, the query doesn't. This query populates a list box that displays all the info in a nice little selectable column arrangement. I've made it work so that it will display all the bug report entries, just can't get it right to filter on user type.
Why are you using a totals query when you are not using an aggregate function?
You might try:
Code:
SELECT DISTINCTROW tblBugReport.BugNumber, tblBugReport.UserName AS [User], tblBugReport.Summary AS Summary, tblBugReport.Priority AS Priority, tblBugReport.Status AS Status
FROM tblBugReport
WHERE tblBugReport.UserName = [Forms]![frmBugs].[txtUserID]
ORDER BY tblBugReport.BugNumber, tblBugReport.UserName, tblBugReport.Summary, tblBugReport.Priority, tblBugReport.Status
My $0.02