View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ronhvb Ronhvb is offline
external usenet poster
 
Posts: 1
Default read access db using excel vb

I have the following code. I keep getting a type mismatch (run time error
13). Could somebody tell me what I'm doing wrong.

Sub Button1_Click()

Dim DbRpt As Database
Dim RsRpt As Recordset


Dim Message As String

Dim strSelPh As String

Dim strSqlCdRpt As String
Dim strOpPath As String


strSelPh = Range("E8").Value
Range("e17").Value = " "

Set DbRpt = _
OpenDatabase("c:\Documents and
Settings\c18850\mvsa\rec04\RecRegistration.mdb")
MsgBox "Database opened"


Set RsRpt = DbRpt.OpenRecordset("combined_ph")
MsgBox "Recordset opened"

End Sub
--
Ron