The issue you are encountering is that each day is it's own control, and each control will only "grow" as it needs to. So, if Sunday has a bunch of stuff and needs to grow it will, but if there is nothing on Monday, Monday will not grow. The only thing I can think to do is to find maximum height of the tallest control (at time of formatting) and apply that height to the other six days. To capture the required height in time for it to be "available" when the report is formatting is going to be the trickiest part.
You may need to play around with a few different approaches, but one that I can think of is to establish a 'MaxLength" field in the underlying query that feeds your calendar.
Place this code in an outside module:
Function MaxOfList(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMax As Variant 'Largest value found so far.
varMax = Null 'Initialize to null
For i = LBound(varValues) To UBound(varValues)
If IsNumeric(varValues(i)) Or IsDate(varValues(i)) Then
If varMax >= varValues(i) Then
varMax = varValues(i)
MaxOfList = varMax
Call it in your query like thus:
The query will now hold an integer value representing the longest string. Now that the longest string is known play around with a few different height values like so:
Assuming you can add a Tag Value to your "CalendarDay" control boxes, you could do this in the OnFormat event of your report:
Dim MyReqHeight as integer
Dim ctl as Control
Select Case MyMaxLen
Case < 100
MyReqHeight = 720 ' 1/2" tall - the minumum height, even if all calendar days are empty
Case >99 and <200
MyReqHeight = 1440 ' 1" tall
Case >99 and <200
MyReqHeight = 2880' 2" tall - the maximum height permitted..
For Each ctl in Me.Controls
If ctl.Tag = "CalendarDayControl" then
ctl.height = MyReqHeight