Mixing imput masks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JTD927
    New Member
    • Jul 2008
    • 1

    #1

    Mixing imput masks

    I am working with Access 2003. I have aclient who would like to have a field where the user can enter either a date or "N/A". I know how to do an input mask for either one but not both. Is there code I can write to to accomplish this? I know how to do the code for "N/A" but how do I add in the date part of it?

    Thank you!

    Troy
  • PianoMan64
    Recognized Expert Contributor
    • Jan 2008
    • 374

    #2
    The String Value N/A is not supported in the Date/Time Field. If the value of the field is Null, you can have a conditional statement that can have the control on the form display N/A, but you can't store that value in the Table.

    Example:

    Code:
    =IIF(IsNull([BlankDateFieldControl]),"N/A",[DateField]))
    You check the control on the form "BlankDateField Control" and see if it is Null, and if it is, then display N/A on loosing focus or whatever event would accommodate what you're trying to do.

    Comment

    Working...