Y
Yves
Hi,
I wrote this code to export data to Excel:
Public StWherePublic As string
Dim strWhere As String
Dim stDocName As String
StWherePublic = "[Date] Between " & _
Format(Me.txtStart, "\#yyyy\/m\/d\#") & " And " & _
Format(Me.txtend, "\#yyyy\/m\/d\#")
stDocName = "S1_P1"
DoCmd.OutputTo acReport, stDocName, , , True
In the Open Event of the Report, I wrote this code:
If StWherePublic <> vbNullString Then
Me.Filter = StWherePublic
Me.FilterOn = True
StWherePublic = vbNullString
End If
I get the file completed in Excel but the problem that I have is that the on
Open Event does not get called (I put a Breakpoint and the code does not get
executed). So my data in Excel does not reflect the dates that the operator
put (the Filter is not working)
Please someone help me.
Thanks,
Yves
I wrote this code to export data to Excel:
Public StWherePublic As string
Dim strWhere As String
Dim stDocName As String
StWherePublic = "[Date] Between " & _
Format(Me.txtStart, "\#yyyy\/m\/d\#") & " And " & _
Format(Me.txtend, "\#yyyy\/m\/d\#")
stDocName = "S1_P1"
DoCmd.OutputTo acReport, stDocName, , , True
In the Open Event of the Report, I wrote this code:
If StWherePublic <> vbNullString Then
Me.Filter = StWherePublic
Me.FilterOn = True
StWherePublic = vbNullString
End If
I get the file completed in Excel but the problem that I have is that the on
Open Event does not get called (I put a Breakpoint and the code does not get
executed). So my data in Excel does not reflect the dates that the operator
put (the Filter is not working)
Please someone help me.
Thanks,
Yves