Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Access 2010 to Access 2003 Expand / Collapse
Author
Message
Posted Tuesday, March 6, 2012 9:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 24, 2014 8:18 AM
Points: 2, Visits: 59
I am trying to create an application in access 2010 that will generate reports and save them as .PDF, using VBA. I'm not very well versed in Access and my question is, if I create a DB in MSA 2010 for this application will someone running MSA 2003 be able to view the DB/Application or would I have to make a work around for it to run on a MSA 2003 box? Essentially I know that there is a button on the ribbon in 2010 that will save it to a PDF, but I'm hard coding it into a button within the application and want to know if I'll have to use LEBAN's module for the 2003 boxes to accomplish this. I'd much rather not, because We'll all be switching over to 2010 in the coming months and Lebans workaround is rather hard to launch commercially.

Thanks in advance,

S.C.
Post #1262314
Posted Tuesday, March 6, 2012 11:35 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 9:57 AM
Points: 1,931, Visits: 19,894
have you considered using Access "run time" for you app?

______________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Post #1262402
Posted Tuesday, March 6, 2012 11:49 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 4:38 PM
Points: 163, Visits: 600
You are sort between a rock and a hard place with 2003. The Lebans code is quite different from the export process that was introduced in 2007 and is available in 2010. Also, you would need to use a MDB format database for 2003 to use it. The other option you might consider is installing a PDF printer for the folks on 2003 and have them print instead of using the export process. But either requires that you have a 2003 version and a 2010 version. The runtime version suggested in the previous reply is a workaround, but involves some effort to create the runtime version.

Wendell
Colorful Colorado
You can't see the view if you don't climb the mountain!
Post #1262413
Posted Tuesday, March 6, 2012 11:53 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 9:57 AM
Points: 1,931, Visits: 19,894
WendellB (3/6/2012)
You are sort between a rock and a hard place with 2003. The Lebans code is quite different from the export process that was introduced in 2007 and is available in 2010. Also, you would need to use a MDB format database for 2003 to use it. The other option you might consider is installing a PDF printer for the folks on 2003 and have them print instead of using the export process. But either requires that you have a 2003 version and a 2010 version. The runtime version suggest in the previous reply is a workaround, but involves some effort to create the runtime version.


havent used access 2101 runtimes...but 2007 runtimes were a doddle to create (providing any VBA code was properly compiled)......the only down side is getting the runtime onto users machines.

But hey....Access app for the end users is free


______________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Post #1262414
Posted Wednesday, March 7, 2012 9:00 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 24, 2014 8:18 AM
Points: 2, Visits: 59
Okay,


So if I'm understanding correctly, I could program the Application and save it in MDB format and the people using 2003 could still access/use it regardless? Printing the documents would actually make an extra step that they don't do now. The idea is to automate the process: click the button to run the report, save it to PDF, and email it to who is required to see it. I've only used VB.net and I'm not well versed in using VBA for access, even the exposure to VB.net was minimal because I worked in C#.net mainly. I'd just like to use one database/application, and not have to program a work around that will be unnecessary in a few months. I'd just like not to use the customers time on something that isn't required. As I said they will be switching over soon, but I'm not really well versed in this language. I'm I hosed on this, or will I be able to save it in a 2003 format that will also work in 2010? Kind of at the end of my knowledge here

Thanks in advance,

S.C.
Post #1263403
Posted Thursday, March 8, 2012 4:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 4:38 PM
Points: 163, Visits: 600
Under the circumstances, I think your best bet is to create the runtime as J. Livingston suggested - the tools to do that are readily available. Are you dealing with a SQL Server backend, or is your data also stored in Access? Also, how many users are involved? Deployment of your project may be more complex depending on the answer to those questions.

Wendell
Colorful Colorado
You can't see the view if you don't climb the mountain!
Post #1263528
Posted Friday, March 9, 2012 1:30 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 6:18 AM
Points: 84, Visits: 1,040
If you keep the database in the 2000 or 2002/2003 format (.mdb) it will be usable on any machine with Access 2003, Access 2007 () or Access 2010 installed (full version or runtime), provided that you dont try to program your own Menus bars or Tool bars.

Moreover this will have the additional benefit of keeping you away from the awful and unnatural "multi-valued field" feature that was introduced with Access 2007.

Trying to install an Access 2007 or 2010 runtime on a machine running Access 2003 is messy and a certified recipe for trouble and headache. The so-called "Access runtime" actually is the full Access program (exe + dll + additional files) with different and/or additional values in Registry keys. This means that you install several versions of Access on the same system, which Microsoft (and experience!) strongly advise against:
Although we do not recommend it, you can install and use more than one version of Microsoft Access on a single computer.
See (among many others): http://support.microsoft.com/kb/870961

Have a nice day!
Post #1264176
Posted Friday, March 9, 2012 6:07 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, November 17, 2014 5:10 AM
Points: 1,516, Visits: 2,719
There is a very old trick that worked with Access 2002-2003 where you would basically switch the default printer to your PDF creator, print the report, and then switch the default printer back to the original one.

' get the current default printer & save it using
Dim DefaultPrinter As String
DefaultPrinter = Application.Printer.DeviceName

' change the default printer to your PDF creator using
Dim PrinterString As String, prt As Printer
PrinterString = "Acrobat PDFWriter"
Set prt = Application.Printers(PrinterString)
Set Application.Printer = prt

' open the report in preview, and then print the report to PDF
DoCmd.SelectObject acReport, Reports(0).Name, False
DoCmd.PrintOut
Do While Reports.Count <> 0
DoEvents
Loop

' restore the original printer
PrinterString = DefaultPrinter
Set prt = Application.Printers(PrinterString)
Set Application.Printer = prt
Post #1264308
Posted Friday, March 9, 2012 2:58 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, April 7, 2014 11:41 AM
Points: 703, Visits: 4,519
Although I can't find the code right now, William's method is one that I've used also. I had some pretty large reports (near 100 pages) and I found that when I exported them to MS Word that Word would randomly drop paragraphs and other random items. I found that printing to PDF solved that, but... Since this user area had about 200 users that all had their own copies of the program they didn't want to buy 200+ copies of PDF Creater just for this.... Then I found a wonderful program named "Cute PDF Writer". It's freeware and works beautifully!!
Post #1264637
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse