Below is my script and it doesn't work right. What I have is a report in a access database that I want to be able to print without acually having the data base open. The script below shows an error when I run it. Any help please?
dim conn, rs, sql, intTelephone, intMobile
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=F:\Data.mdb;" & _
"Jet OLEDB:System Database=F:\Secured.mdw", _
"Login", "Password"
sql = "SELECT * FROM [Table1]"
rs.open sql, conn, 3, 3
stDocName = "Letter"
DoCmd.OpenReport stDocName, acNormal
rs.close
Conn.Close
dim conn, rs, sql, intTelephone, intMobile
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=F:\Data.mdb;" & _
"Jet OLEDB:System Database=F:\Secured.mdw", _
"Login", "Password"
sql = "SELECT * FROM [Table1]"
rs.open sql, conn, 3, 3
stDocName = "Letter"
DoCmd.OpenReport stDocName, acNormal
rs.close
Conn.Close