This sql string tells me it expects ")".
There must be one place I haven't tried and I have no idea where that place is.
The problem is in the where clause and specifically after the "And", as I read it.
The where clause was originally a "Having" clause but this seemed to be causing even more trouble.
The function is used as the rowsource for a combobox.
Suggestions please.
	
	
	
		
 There must be one place I haven't tried and I have no idea where that place is.
The problem is in the where clause and specifically after the "And", as I read it.
The where clause was originally a "Having" clause but this seemed to be causing even more trouble.
The function is used as the rowsource for a combobox.
Suggestions please.
		Code:
	
	
	Public Function getCommonName(sGenus As String, sSpecies As String) As String
    Dim sQry As String
    sQry = "SELECT A.Common " & _
           "FROM Common_Names as A " & _
           "GROUP BY A.Common, A.Genus, A.Species " & _
           "WHERE (((A.Genus) ='" & sGenus & "'" And ((A.Species) = "'" & sSpecies & "'"" )) " & _
           "ORDER BY A.Common;"
    getCommonName = sQry
End Function 
	 
 
		 
 
		 
 
		 
 
		 
 
		
 
 
		