View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Dave Patrick Dave Patrick is offline
external usenet poster
 
Posts: 249
Default Compile Error\Interacting with Access

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