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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -