my form requires first and last name but nick name is optional. I want to fill the nick name with first name wherever it is left blank. I’m not sure how to set up an event for this.
my form requires first and last name but nick name is optional. I want to fill the nick name with first name wherever it is left blank. I’m not sure how to set up an event for this.
I would start with trying the form BeforeUpdate event. That way, if the field is bound, you can make the nick name field the same as what the first name field is. Seems like a very odd thing though.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Code:
Me!NickName = Nz(Me!NickName, Me!FirstName)
Alternative is to just calculate in query or textbox on report:
=Nz([NickName],[FirstName])
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Or, if no nick name is supplied, use the FirstName where ever you need to use Nickname--no need to store it twice.
Logic,
use Nickname if available, or use FirstName if Nickname is empty.
That works- thanks