Access 2010 VS 2007 Error Message

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Access 2010 VS 2007 Error Message

Post by mishmish3000 »

:sad: :sad:
Hey, I'm working with Access 2010 and some of my end users have earlier versions, like 2003 or 2007. I know that 2010 and 2007 have the same file name extension (*.accb), so they should work ok, shouldn't they? I also know how to save the 2010 version as 2003 for those users who have 2003. BUT... here's the deal. I made a database for an end user who has 2007 on his pc. He was using it and it was working ok until day before yesterday. Then he saw an error screen open when he tried to use it. I've attached the screen shot in a Word document. Any ideas on how to fix this? I'm stumped.
Thanks
MishMish3000
ILI Report DB Application Error Question.docx
You do not have the required permissions to view the files attached to this post.
Anne

User avatar
HansV
Administrator
Posts: 78478
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access 2010 VS 2007 Error Message

Post by HansV »

Access 2010 introduced some new features that are not available in Access 2007, even if the file extension .accdb is the same for Access 2007 and Access 2010 databases.
Does the end user need to change the design of forms or reports?
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Access 2010 VS 2007 Error Message

Post by mishmish3000 »

The only thing the end user needs to do is change the location of where he's importing a file from and where he's exporting the file to. That's in a form coding module. He was able to do that a couple of days ago but now all he gets is this error. So for instance, he has to change the following code:
Private Sub Command4_Click()
'Export the file to a specific tab in a specific spreadsheet
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, _
"TblExportTable", "C:\Users\dc49828\Documents\CEDS\ILI Report DB Application and Excel File\ili_spnrpt_2012.xlsx", True, "Reg Summ1"
'This exports the TblExportTable to a file in the above location--you can change it on your system--to a specific tab in the file.
End Sub

This exports it to my machine since it has my user code in it (DC49828); he has to change it to his user code.

Thanks
MishMish3000
Anne

User avatar
HansV
Administrator
Posts: 78478
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access 2010 VS 2007 Error Message

Post by HansV »

Changing the code behind a form counts as a design change.

Apparently you have modified something in the form that Access considers to be specific to Access 2010, and hence the design of the form cannot be changed any more in Access 2007. The modification could be very minor, but that doesn't matter.

As a workaround, I'd store the path in a table, and retrieve the path in the code.
The user only needs to edit a record in the table (you could provide a form for that), without needing to edit code.

Let's say you create a table tblSettings with 2 text fields:
ID (text, 50 characters, Primary Key)
Setting (text, 255 characters)

Create a single record in this table with the following values:

ID = ILI Report
Setting = C:\Users\dc49828\Documents\CEDS\ILI Report DB Application and Excel File\ili_spnrpt_2012.xlsx

Change the code as follows:

Code: Select all

Private Sub Command4_Click()
    'Export the file to a specific tab in a specific spreadsheet
    Dim strFile As String
    strFile = DLookup("Setting", "tblSettings", "ID='ILI Report'")
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, _
        "TblExportTable", strFile, True, "Reg Summ1"
End Sub
Best wishes,
Hans

User avatar
mishmish3000
PlatinumLounger
Posts: 3691
Joined: 15 Jul 2010, 14:10
Location: Milton, TN

Re: Access 2010 VS 2007 Error Message

Post by mishmish3000 »

Excellent!!! Thanks so much!
Anne