469,609 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

DBEngine - Access 2003 vs Access 2010

Hi folks,

My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question used work in 2003 (see below code).

Expand|Select|Wrap|Line Numbers
  1. Private Sub engSave_Click()
  3.     Dim strSql3 As String
  5.     'Archive order number and cost data for engine.
  6.         strSql3 = "UPDATE tblQuotePkgEngine INNER JOIN qryQuotePkgEngine ON " & _
  7.             "(tblQuotePkgEngine.engPrcID = qryQuotePkgEngine.engPrcID) " & _
  8.             " AND (tblQuotePkgEngine.pkgID = qryQuotePkgEngine.pkgID) " & _
  9.             " SET tblQuotePkgEngine.soHist = [qryQuotePkgEngine]![OrderNo], " & _
  10.             " tblQuotePkgEngine.costHist = [qryQuotePkgEngine]![Cost (CDN)], " & _
  11.             " tblQuotePkgEngine.prcHist = [qryQuotePkgEngine]![Price] " & _
  12.             " WHERE (((tblQuotePkgEngine.pkgID)= " & Me.pkgID & "));"
  13.         DBEngine(0)(0).Execute strSql3, dbFailOnError
  15.         Forms![fmQuotePkgDetails].Refresh
  16.         Forms![fmQuotePkgDetails]![modDate] = date
  18.         MsgBox ("Engine modification now saved.")
  20. End Sub
Since the upgrade to 2010, this chunk of code no longer seems to work. No error messages are given. In fact by all appearances, it looks like it executes the code as the final message I see is the msgbox item but when you look on the table, values that are supposed to be copied to the archive fields are not being executed. My suspicion is that it has to do with the "DBEngine(0)(0).Execute strSql3, dbFailOnError" chunk of code, in particular the DBEngine(0)(0) piece.

I'm assuming Access 2010 does not recognize this anymore?

Can someone enlighten me please as this is something I've been trying to chase down for the last day or so.

Thanks in advance.

Nov 18 '10 #1
1 4926
32,200 Expert Mod 16PB
I can't help much here Alan I'm afraid, but were I in your position I would :
  1. Trace (See Debugging in VBA) through the code until you determined that the results were not as you expected. That will give you which line is not behaving as expected.
  2. Search the web for pages dealing with differences between versions of Access (You may want to start at Exploring Office 2010).
Nov 18 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Wayne Aprato | last post: by
28 posts views Thread by Neil Ginsberg | last post: by
3 posts views Thread by Mike Gramelspacher | last post: by
1 post views Thread by paul.hanti | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.