Print Page | Close Window

Compile error

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2791
Printed Date: 17 November 2024 at 1:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Compile error
Posted By: Semisi
Subject: Compile error
Date Posted: 25 August 2005 at 5:36pm

I'm a beginner user of VB and I've entered these codes which links to Microsoft Access and few excel files but keeps getting a compiler error: Method or data member not found. this highlights the Bnk = Inpt.Bank

As I'm only a beginner user I'm not sure what is wrong.

Below is the code I entered

DoCmd.TransferSpreadsheet acImport, 5, Tbl, "MB_INPT.XLS", True, "BRF_Data!"

Set Inpt = Db.OpenRecordset("Input_tmp", dbOpenTable)
Inpt.MoveFirst
Bnk = Inpt.Bank
Bnk = "'" & Inpt.Bank & "'"
Dte = Format(Inpt.Ddate, "dd-mmm-yy")
Inpt.Close

k = Del_Qry("Qry_del")

Qry_def = "DELETE DISTINCTROW Data.Bank, Data.Ddate "
Qry_def = Qry_def & "FROM Data "
Qry_def = Qry_def & "WHERE ((Data.Bank= " & Bnk & ") AND (Data.Ddate= #" & Dte & "#)); "
Qry.Name = "Qry_del"
Qry.SQL = Qry_def
Db.QueryDefs.Append Qry
Qry.Execute
Qry.Close

k = Add_Tab(Tbl, "Data")

k = Del_Qry("Qry_del")
k = Del_Tab(Tbl)
Kill "MB_INPT.XLS"

Beep
MsgBox "Database has been successfully updated!", 0, "Money and Banking Update"
'k = MsgBox("Do you wish to exit Access?", 4, "Money and Banking Update")
'If k = 6 Then

DoCmd.RunMacro "ExitAccess"

'End If

End Function

I would be very grateful of any suggestions

Semisi

 

 



-------------
Malo,
Semisi 'Ofa Lokotui



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net