Sevn
I trust ME!
- Local time
- Today, 07:08
- Joined
- Mar 13, 2008
- Messages
- 97
I am only a beginner...
I have the following code running on a report, and am wondering how I can auto increment the exports (Example: : 001, 002, etc.). Any help is appreciated.
Private Sub Report_GotFocus()
If Forms!SelectReportType!Combo6 = "Normal" Then
MkDir "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Normal\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2)
Else
MkDir "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Ad Hoc\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2)
End If
If Forms!SelectReportType!Combo6 = "Normal" Then
DoCmd.OutputTo acOutputReport, "OTDComparisonsByOrder", acFormatRTF, "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Normal\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & "\OSM-" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & ".rtf", False
Else
DoCmd.OutputTo acOutputReport, "OTDComparisonsByOrder", acFormatRTF, "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\AdHoc\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & "\OSM-" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & ".rtf", False
End If
End Sub
I have the following code running on a report, and am wondering how I can auto increment the exports (Example: : 001, 002, etc.). Any help is appreciated.
Private Sub Report_GotFocus()
If Forms!SelectReportType!Combo6 = "Normal" Then
MkDir "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Normal\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2)
Else
MkDir "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Ad Hoc\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2)
End If
If Forms!SelectReportType!Combo6 = "Normal" Then
DoCmd.OutputTo acOutputReport, "OTDComparisonsByOrder", acFormatRTF, "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\Normal\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & "\OSM-" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & ".rtf", False
Else
DoCmd.OutputTo acOutputReport, "OTDComparisonsByOrder", acFormatRTF, "C:\Documents and Settings\youngje\Desktop\Orders_Shipped_Metric\Exports\AdHoc\" & "\" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & "\OSM-" & Year(Now) & Right("0" & Month(Now), 2) & Right("0" & Day(Now), 2) & ".rtf", False
End If
End Sub