showing a number of fields (on a subform) based on a field's value(number) on frmMain
Hello,
on my main form I have several fields, the one I need for this is a calculated field, that takes [StartDate] and [EndDate] and converts it into a number with DateDiff("d";[StartDate];[EndDate]). So far so good.
Now on a sub form I have listed 16 fields (the date range is between a min of 3 and a max of 16 days).
For the first field, I've assigned the Value of StartDate to it (=[Forms]![frmMain]![StartDate] as the control source, and then subsequentially added to that a +1,+2... until +15 (=[Forms]![frmMain]![StartDate]+1 for the second day... ) for the following days to display the date of that day. They do show the correct date (wonder if there is a better way of doing that).
What I want to do is to show only the date fields (on the subform) that correspond to the number of days shown in the field that calculates the days. So instead of showing 16 entries for each record, I want to show only as many days as the calculated field shows.
Not sure if I made myself clear, but I hope I did :)