Just noticed a problem with your SQL. C21CF2BF was missing the single
quotes. Should have been;
Set Recordset = New ADODB.Recordset
With Recordset
' Filter
Src = "SELECT * " _
& "FROM MedicalStatus " _
& "WHERE (((UNIT)='125 LOGISTICS READINES SQ') AND ((PASCODE)='C21CF2BF'));
"
' ######## Added the line below #######
.Open Source:=Src, ActiveConnection:=Connection
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect