Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Compile error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Compile error

 Post Reply Post Reply
Author
Message
Semisi View Drop Down
Newbie
Newbie
Avatar

Joined: 25 August 2005
Location: Tonga
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semisi Quote  Post ReplyReply Direct Link To This Post Topic: Compile error
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.