How to Use Lebans .pdf code access 2000

PNGBill

Win10 Office Pro 2016
Local time
Today, 14:17
Joined
Jul 15, 2008
Messages
2,271
Hi Forum,

Just downloaded Lebans sample database and two dlls.

Files are: A2000SnapshotToPDFver785.mdb
dynapf.dll
StrStorage.dll

My understanding is that the two .dll files must be copied to the same folder where our database is stored but... Front End or Back End ??

The code itself is more the one Sub.
These are not Public so does that mean they must be repeated at every instance of a command Button to create a Report (that we want as a .pdf)

Anyone using Lebans on access 2000?

Thanks, Bill
 
I use it with 2000. I put them in the Windows/System32 directory which is also allowed, but if you put them with the database it would be where the front end is. I don't have it here on my laptop, but I'm quite sure I just copied his code into a standard module, not to each button that may call it.
 
I store the dll files in the folder where the .mdb or .mde file exists.

Copy his code into a new module e.g. mod_Report2PDF

Then to call it......
For a button on click event something like this:

Code:
dim rptName
dim filename
dim DateTo
dim DateFrom
dim username
dim FSO
dim blRet

Set FSO = CreateObject("Scripting.FileSystemObject")
username = VBA.Environ("USERNAME")

rptName = "rpt_NotInspected"

dateTo = Forms(frm_tot)!cmbDateTo.Value
dateTo = Replace(dateTo, "/", ".")
dateFrom = Forms(frm_tot)!cmb_dateFrom.Value
dateFrom = Replace(dateFrom, "/", ".")
filename = "S:\Cleansing\" & username & "_Inspection_Reports\" & dateFrom & "_to_" & dateTo & "_Not_Inspected.PDF"

Dim theFolder
theFolder = "S:\Cleansing\" & username & "_Inspection_Reports"
If Not FSO.folderexists(theFolder) Then
    FSO.createfolder (theFolder)
End If



'call the Lebans PDF creating module
blRet = ConvertReportToPDF(rptName, vbNullString, filename, True, False, 150, "", "", 0, 0, 0)
 
Last edited:
Thanks Paul and SpentGeezer,
Seems to be working fine.:)
Should have attempted this earlier but lack of confidence held me back.

Had Internet issues for two days and couldn't stay on long enough to reply.:mad:
 
I have them in the dbs front end. just easier to ensure they are there, i find.
 
Happy to help. I use the Windows folder in part because I have my version control utility putting the front end in user specific folders (necessary in a TS/Citrix environment). I don't want to have them in multiple places.
 

Users who are viewing this thread

Back
Top Bottom