PDA

Click to See Complete Forum and Search --> : Accessing Word documents stored in a db


glowby
Jan 13th, 2000, 01:29 AM
I have a table in access 97 called Airports which stores information about certain airports. Each record has a Field called Comments which is saved as OLE types. How do I access these word documents. Here is what I have so far:

Private Sub cmdComment_Click()

Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Set db = OpenDatabase("c:\Winnt\...\Airlines.mdb")


strSQL = "SELECT Comment " & _
"FROM Airports " & _
"WHERE Airport_Name = '" & strAir & "' " '(where strAir can equal Los Angele")

Set rs = db.OpenRecordset(strSQL)

Let frmComment.oleComment.SourceItem = rs.Fields("Comment")

rs.Close

db.Close

frmComment.Show 1
End Sub

Thanks for accepting my questions