vba - Date Stamp on data entry -
i trying date stamp field when field has had valid data entered.
below have:
private sub purchaser_afterupdate() if purchaser.value <> "" date_alloc.value = now() end if end sub however not work. there no error message; doesn't enter date.
when purchaser.value null, condition purchaser.value <> "" not true, nothing assigned date_alloc.value.
change if condition true whenever purchaser.value null or contains empty string ("").
private sub purchaser_afterupdate() 'if purchaser.value <> "" if len(me.purchaser.value & vbnullstring) > 0 me.date_alloc.value = now() end if end sub
Comments
Post a Comment