Hello all,
I need to revisit a previous thread that mostly resolved my problem.
I have this popup form with subform that user enters dates into.
I have entered a series of dates in the subform. The Dates box on the main form is calculated ... =DatesToTextBox(), code as follows:
The subform's AfterUPdate property calls for a requery of the textbox on the main form, i.e. calculate the dat
The problem is that the textbox doesn't update. I put the CalcDates button on the main form, temporarily, to force the update, but it doesn't happen.
If I close and reopen the form, the textbox is updated to reflect the dates. I can also delete lines of dates and the textbox updates for what was removed.
What am I doing wrong here?
Thanks in advance for any help with this.
MIB1019
I need to revisit a previous thread that mostly resolved my problem.
I have this popup form with subform that user enters dates into.
I have entered a series of dates in the subform. The Dates box on the main form is calculated ... =DatesToTextBox(), code as follows:
Code:
Public Function DatesToTextBox() As String 'returns string value of dates in recordset, comma separated, formatted 'm/d'
Dim v As Variant
Dim s As String
'
With Me!subfrmIODates.Form.RecordsetClone
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
v = .Fields("Air_Date").value
If Not IsNull(v) Then
v = CDate(v)
s = s & Format(v, "m/d") & ", "
End If
.MoveNext
Wend
End With
If Len(s) > 0 Then s = Left(s, Len(s) - 2)
DatesToTextBox = s
End Function
The subform's AfterUPdate property calls for a requery of the textbox on the main form, i.e. calculate the dat
The problem is that the textbox doesn't update. I put the CalcDates button on the main form, temporarily, to force the update, but it doesn't happen.
If I close and reopen the form, the textbox is updated to reflect the dates. I can also delete lines of dates and the textbox updates for what was removed.
What am I doing wrong here?
Thanks in advance for any help with this.
MIB1019