G
Guest
Hi,
I have a report that is based on a query. The query is filled with
information between two dates that are set as peramiters in the query. [Start
Date] and [End Date]. How do I pass the values of the peramiters to my
variables to undertake a calculation to show how many days there are between
the dates. My code is as follows and in the OnActivate event of my report:
Private Sub Report_Activate()
Dim StartDate As Integer
Dim EndDate As Integer
Dim Days As Integer
Dim query As Control
StartDate = [Start Date] '[Start Date] and [End Date] are peramiters
EndDate = [End Date] 'that are taken from a query to produce the
report
Days = EndDate - StartDate
Me.txtDays = Days 'txtDays is the control I wish to pass the
calculation to
End Sub
I have a report that is based on a query. The query is filled with
information between two dates that are set as peramiters in the query. [Start
Date] and [End Date]. How do I pass the values of the peramiters to my
variables to undertake a calculation to show how many days there are between
the dates. My code is as follows and in the OnActivate event of my report:
Private Sub Report_Activate()
Dim StartDate As Integer
Dim EndDate As Integer
Dim Days As Integer
Dim query As Control
StartDate = [Start Date] '[Start Date] and [End Date] are peramiters
EndDate = [End Date] 'that are taken from a query to produce the
report
Days = EndDate - StartDate
Me.txtDays = Days 'txtDays is the control I wish to pass the
calculation to
End Sub