G
Guest
Hi All,
I'm having a slight issue with the following code. It *should*
1. Enter a date (via datepicker) in TapeUsedDate
2. Have a look in the BUType field to determine whether the value is "daily"
or "monthly".
3. Update the TapeDueOnsiteDate using dateadd against the TapeUsedDate (the
dateadd value is determined in 2.
Private Sub TapeUsedDate_AfterUpdate()
If [BUType] = "Daily" Then [TapeDueOnsiteDate] = DateAdd("d", 28,
[TapeUsedDate])
If [BUType] = "Monthly" Then [TapeDueOnsiteDate] = DateAdd("m", 24,
[TapeUsedDate])
End Sub
This doesn't seem to be working in "real-time" - ie the TapeDueOnsiteDate
does not update on the form. It's ok if I close and reopen the form, and is
therefore updating the table. So what am I missing - what forces the form
value to "refresh" by re-opening?
Also just noticed that it doesn't update at all (ie after re-opening the
form), if I select the TapeUsedDate using datepicker. Any ideas here too?
Thanks,
Mike
I'm having a slight issue with the following code. It *should*
1. Enter a date (via datepicker) in TapeUsedDate
2. Have a look in the BUType field to determine whether the value is "daily"
or "monthly".
3. Update the TapeDueOnsiteDate using dateadd against the TapeUsedDate (the
dateadd value is determined in 2.
Private Sub TapeUsedDate_AfterUpdate()
If [BUType] = "Daily" Then [TapeDueOnsiteDate] = DateAdd("d", 28,
[TapeUsedDate])
If [BUType] = "Monthly" Then [TapeDueOnsiteDate] = DateAdd("m", 24,
[TapeUsedDate])
End Sub
This doesn't seem to be working in "real-time" - ie the TapeDueOnsiteDate
does not update on the form. It's ok if I close and reopen the form, and is
therefore updating the table. So what am I missing - what forces the form
value to "refresh" by re-opening?
Also just noticed that it doesn't update at all (ie after re-opening the
form), if I select the TapeUsedDate using datepicker. Any ideas here too?
Thanks,
Mike