I am struggling to work out a solution for probably a very simple question...
In my report I have a textbox control (txtFinYear) which displays the data selected from a combobox on a form eg: 2003/04, 2004/05 This works fine.
But I also have two textboxes one called txtFirstFinDate and the other txtSecFinDate. What I am trying to achieve is that when the report displays the txtFirstFinDate shows the first date and txtSecFinDate shows the second date of what was selected in the txtFinYear.
eg: if txtFinYear = 2003/04 then
txtFirstFinDate = 1 July 2004
txtSecFinDate = 30 June 2004
I have tried using VBA code in the Report open
Private Sub Report_Open(Cancel As Integer)
Select Case [Forms]![membership renewal form]![cboFinYear]
txtFirstFinDate = "1 July 2003"
txtSecFinDate = "30 June 2004"
txtFirstFinDate = "1 July 2004"
txtSecFinDate = "30 June 2005"
But this does not display the relevant dates on the report...
Can anyone offer some help on this or is there a better way of doing this?