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
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