Dim db As Database
Dim rs As Recordset
Dim wb As Object
Dim qstr7 As String
Set db = OpenDatabase("c:\stock.mdb")
Set wb = GetObject("c:\book1.xls")
qstr7 = " Insert into nice_rpt " _
& "select Description.StockCardNo, Description.Description, Product.Specifications, Received_On.DateReceived, Received_On.QtyReceived, Received_On.UnitPrice, Received_On.BillNumber from Description, Product, Received_On where Description.StockCardNo = Product.StockCardNo and Product.ProductID = Received_On.ProductID order by Product.ProductID "
Set rs = db.OpenRecordset("nice_rpt")
.Parent.Windows("book1.xls").Visible = True
Set wb = Nothing
Set rs = Nothing
i got a
runtime error '-2147417851 (80010105)';
method 'copyfromrecordset' of object 'Range' failed
can anyone tell me what's wrong?