Hi Everyone,
I have a strange one for you.
When I use the shift key to get into the database design, if I then open the form and press the reports button on the form the following code works fine
Dim RDate As String
Dim House As String
Dim strFile As String
Dim strFile1 As String
RDate = Format(Now(), "dd-mm-yy -HH-NN-SS")
House = Forms![FrmSchemes]![HousesAttached].Column(1)
strFile = ("Inventory Report for " & House & " - Created " & "" & RDate & "" & ".DOC")
strFile1 = ("Information Pack Report for " & House & " - Created " & "" & RDate & "" & ".DOC")
DoCmd.OutputTo acOutputReport, "RptHouseInventory", acFormatRTF, strFile, True
DoCmd.OutputTo acOutputReport, "RptHouseInformationPack", acFormatRTF, strFile1, True
if I now close the database and open the database without using the shift key and press the report button the code does not work.
I am not sure if I am giving you enough information to help you, as I am at a loss as to why this is not working.
Any thoughts
Thanks
CNEILL
I have a strange one for you.
When I use the shift key to get into the database design, if I then open the form and press the reports button on the form the following code works fine
Dim RDate As String
Dim House As String
Dim strFile As String
Dim strFile1 As String
RDate = Format(Now(), "dd-mm-yy -HH-NN-SS")
House = Forms![FrmSchemes]![HousesAttached].Column(1)
strFile = ("Inventory Report for " & House & " - Created " & "" & RDate & "" & ".DOC")
strFile1 = ("Information Pack Report for " & House & " - Created " & "" & RDate & "" & ".DOC")
DoCmd.OutputTo acOutputReport, "RptHouseInventory", acFormatRTF, strFile, True
DoCmd.OutputTo acOutputReport, "RptHouseInformationPack", acFormatRTF, strFile1, True
if I now close the database and open the database without using the shift key and press the report button the code does not work.
I am not sure if I am giving you enough information to help you, as I am at a loss as to why this is not working.
Any thoughts
Thanks
CNEILL