ms access - Way to allow users to delete textbox content but not edit it? -


on form have control displays generated id number. want allow user delete number (necessary generate new id number), not able edit or create own.

so far can think of 3 workarounds, none ideal, , wondering whether had handier solution? of problems come balancing between making easy use form difficult accidentally/carelessly delete id number.

workaround #1: keep control disabled @ times, add button allow them clear it. downside: have several buttons in area on form , it's getting little crowded, i'd avoid that.

workaround #2: convert textbox combobox no options listed , edits set no, can delete information not add any. downside: dropdown arrow on control may confuse users thinking should use combobox, need give them explanatory popup message if try enter data , they're encountering lot of messages if try forbidden actions/to confirm deletion of records/certain important controls.

workaround #3: allow them generate new id number while have id number, resetting it. downside: again, have give them message interactions confirm want delete id number, seems little messier making them delete confirm don't want id number. worried bordering on message fatigue meaning users wouldn't bother reading deleting existing number.

if can't find better workaround, i'll go workaround #2, seems least work me. have better suggestions?

use beforeupdate event of textbox:

 cancel = not isnull(me!serialnumber.value)  if cancel = true       msgbox "number can deleted not edited."  end if  

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -