database, Data field not found

sailor
01-28-2003, 02:47 PM
This works on my computer at work, but not at home, any suggestions.

Private Sub Command5_Click()
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strParm As String
Dim sql1 As String

name1 = Text1.Text
sql1 = "SELECT DOA, DOB, `Full name`, GP, `Marrital status`,nationality, NOK, `NOK address`, `NOK Relationship`,`NOk tel no`,Religion, `S/W tel no`, sex, `Social worker`,`National Ins`, `Admitted from`,`GP address`, Admissiondetails From `Res data`where `full name` = (" & Chr$(34) & Text1.Text & Chr$(34) & ")"

db.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Care Manager\Lister Residential.mdb;"
rs.Open sql1, db

Set rptFrontSheet.DataSource = rs
rptFrontSheet.Show
End Sub

Thinker
01-28-2003, 02:52 PM
Let me guess - your home computer has WinXP?
First off - stop using the 3.51 provider, and start using 4.0. Next,
make sure you are referencing ADO 2.5 or higher (but 2.5 is best
for Jet). Next, if on XP, make sure you get Jet sp3 installed.
Look here www.microsoft.com/data www.microsoft.com/data/download.htm

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum