Dan Waters
dwaters at usinternet.com
Thu Jun 9 13:48:07 CDT 2005
Mike, 1) You have an unneeded space at the end of FROM tblInventory. 2) Check the rules on field names - is a + sign usable? 3) Try running this without DISTINCT to see if it works then. HTH! Dan Waters -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gowey Mike W Sent: Thursday, June 09, 2005 10:46 AM To: Access Developers discussion and problem solving Subject: [AccessD] Value Retrieval I'm wondering if someone can get me out of my brain freeze: I want to be able to display the value of the following select statement on a form. It should only find one tag number since I do not allow duplicates. I want to be able to see the results on the form. strSQL = "SELECT DISTINCT tblInventory.[DOC Tag Number+] FROM tblInventory " strSQL = strSQL & " WHERE tblInventory.[DOC Tag Number+] = '" & Tag & "'" strSQL = strSQL & " ORDER BY tblInventory.[DOC Tag Number+];" Thanks in advance for any advice. Mike Gowey MCDST, A+, LME, NET+ Team Leader - East Region Information Systems Unit -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com