i have 4 tables with a folderpath in them. this takes reports to the respective places on the server
table name folderpath
pdffolder \\192.168.4.16\contdocs\sales\orders\current orders
pdffolderpd \\192.168.4.16\contdocs\production\current orders
pdffoldere \\192.168.2.14\contdocs\engineering \bom
pdffolderp \\192.168.4.16\contdocs\purchasing\purchase orders
the part code below is for the first folderpath " pdffolder"
although this works ok , is it the correct way to do this or should all 4 be in one table ? if it should how do i get the code to look at the correct row in the table
thanks steve
table name folderpath
pdffolder \\192.168.4.16\contdocs\sales\orders\current orders
pdffolderpd \\192.168.4.16\contdocs\production\current orders
pdffoldere \\192.168.2.14\contdocs\engineering \bom
pdffolderp \\192.168.4.16\contdocs\purchasing\purchase orders
the part code below is for the first folderpath " pdffolder"
although this works ok , is it the correct way to do this or should all 4 be in one table ? if it should how do i get the code to look at the correct row in the table
thanks steve
Code:
On Error GoTo Err_Handler
Const FOLDER_EXISTS = 75
Const MESSAGE_TEXT1 = "No current invoice."
Const MESSAGE_TEXT2 = "No folder set for storing PDF files."
Dim strFullPath As String
Dim varfolder As Variant
If Not IsNull(Me.id) Then
' build path to save PDF file
' varFolder = "C:\Users\User\Documents"
varfolder = DLookup("Folderpath", "pdfFolder")
If IsNull(varfolder) Then
varfolder = varfolder & "\" & year(date) & "\" & [Order Details subform]![CustomerName] & "\" & "NCO" & Format(Me.NCO_No, "0000")