Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macola VBA unrecognized database format

Status
Not open for further replies.

zedsded

IS-IT--Management
Jun 9, 2002
68
Hello.
Environment: Macola Progression 7.6400a, MSSQL
Goal: Simple automated entry of POs that require only few keyboard "TABs" or "ENTERs" and uniform accross several POs.

I'm getting error "unrecognized database format" in Macola VBA. I'm trying to open records from Access 2007, and have referenced it in VB with Microsoft Office 12.0 Object Library. I created an MS Access 2003 datasource and pointed to it to see if it works - and it does. How can i make it work in Access 2007?
Thank you.

Please see sample code below.

Public Function enterPOHDR()
Dim dbs As DAO.Database
Dim rstHDR As DAO.Recordset
Dim rstDTL As DAO.Recordset
'Dim strSql As String
Dim ordno As String
Dim vendno As String
Dim orddt As String
Dim cmnt As String

Set dbs = OpenDatabase("C:\AccessDB\WebFlowersToMacola.accdb")
Set rstHDR = dbs.OpenRecordset("WFtoMACnewPOHardGoodHeader", dbOpenSnapshot)

rstHDR.MoveFirst
ordno = Left(rstHDR![ord_no], 6)
vendno = rstHDR![vend_no]
cmnt = rstHDR![cmt_1]

macForm.OrdRelNo.SetFocus
macForm.OrdRelNo.Text = ordno
SendKeys ("{TAB}")
SendKeys ("{TAB}")
macForm.VendorNo.Text = vendno
SendKeys ("{TAB}")

End Function
 
Most likely there is a reference you need to add to you project to read either the MS Access database or to create a DAO record set.

I did notice you are trying to set the value of the VendNo field and you cannot do this unless the field has focus. Also what event is the code above based on?

In the big picture, what are you trying to do exactly? It seems like you are trying to look up the order # and vendor from an access database. How can this exist in Access before it exists in Macola? Are you manually entering this info in Access and if so why?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
dgillz,
I am new to this company and the reason behind having two mrp/erp system (Macola, and later a "customised solution"), is beyond me. The two systems are now utilized as one being a production platform, and Macola as a financial platform.

Back to my goal:
I am pulling data from the new system via Access, and basically wanted to automate PO entry as if entered by a user. There are only few keytrokes anyway. And yes, I am aware of the required "focus" before "change" requirement in Macola screen. You actually told me that on a different thread. BTW, i have created relationships for both system's key information (e.g. Macola's vendor no = New system's Vendor ID)

Thanks Again!
 
Wrong library registered, Access 2007 used a modified form of DAO

C:\Program Files\Microsoft Office\Office12\acedao.dll should show as "Microsoft Office 12.0 Access database engine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top