After Update - Updating a different field

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
 
G

Guest

Hi,

I've solved the first issue by adding a me.Refresh

Can anyone help out with the DatePicker module (Brendan Kidwell's)? Somehow,
the form isn't classifying the selected date from the popup calendar as
having updated the field, I assume...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top