Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is it possible to add the following expression in the Validation Rule in a table?
    =StrConv(FirstName, vbProperCase)

    Thanks.
    Armstrong

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    That won't work, for the expression in the Validation Rule must evaluate to True or False. Your expression returns a string.

    If you want to convert a field to proper case, you must do so in the After Update event of the text box bound to the field on the data entry form, or in the Before Update event of the form as a whole.

  3. #3
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='782159' date='28-Jun-2009 22:13']That won't work, for the expression in the Validation Rule must evaluate to True or False. Your expression returns a string.

    If you want to convert a field to proper case, you must do so in the After Update event of the text box bound to the field on the data entry form, or in the Before Update event of the form as a whole.[/quote]
    Hi Hans,
    Thanks for your suggestion. However, your solution requires a form, which I wish to avoid if possible. That's why I ask whether the capitalization can be done thru the validation rule. Apparently, it's impossible.
    Armstrong

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can't do such things in a table or query. But that's not a problem, since end users should never work directly with tables or queries, only with forms and reports.

  5. #5
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='782168' date='28-Jun-2009 23:19']You can't do such things in a table or query. But that's not a problem, since end users should never work directly with tables or queries, only with forms and reports.[/quote]
    Thanks for your help.
    Armstrong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •