All Caps Validation Rule

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I understand that by typing a > in the format portion of the field
properties, it will convert any lower case text entered into upper case. My
problem is on export to Excel, it recognizes the original lower case input.
I would like the export to also be in all caps. I am sure there is a
validation rule, but I cannot find it. Any ideas? Thanks.
 
Just use the UCase function.... either in the AfterUpdate event of the
control where the user types in the data, or in a query's calculated field
to convert the data for the export.
 
Thank you, Ken. Appreciate your help.



Ken Snell said:
Just use the UCase function.... either in the AfterUpdate event of the
control where the user types in the data, or in a query's calculated field
to convert the data for the export.
 
Ken,

Sorry to trouble you again, but after setting up the Macro and then
assigning the Macro to the After Update property of the form, I get this
error message:

"You tried to run a Visual Basic procedure to set a property or method for
an object. However, the component doesn't make the property or method
available for Automation operations.

"Check the component's documentation for information on the properties and
methods it makes available for Automation operations."

Sorry, I'm stupid. What does this mean????

Thanks.

Stacy
 
Ken,

The Macro (M_Noun Upper Case) is as follows:

Action = Set Value
Item = [T_Master Spares Provisioning Record]![Noun]
Expression = UCase([Noun])

I then set the After Update Property in the form as follows:

After Update = M_Noun Upper Case

I don't recall doing anything else. Again, appreciate your help.

Stacy
 
You need to specify that it's a form object in the Item expression:

Action = Set Value
Item = Forms![T_Master Spares Provisioning Record]![Noun]
Expression = UCase([Noun])


Also, if this still isn't working quite right, then try this:

Action = Set Value
Item = Forms![T_Master Spares Provisioning Record]![Noun]
Expression = UCase(Forms![T_Master Spares Provisioning Record]![Noun])

--

Ken Snell
<MS ACCESS MVP>

Stacy said:
Ken,

The Macro (M_Noun Upper Case) is as follows:

Action = Set Value
Item = [T_Master Spares Provisioning Record]![Noun]
Expression = UCase([Noun])

I then set the After Update Property in the form as follows:

After Update = M_Noun Upper Case

I don't recall doing anything else. Again, appreciate your help.

Stacy

Ken Snell said:
How did you set up the macro? post the actions / steps.
 
Stacy said:
I would like the export to also be in all caps. I am sure there is a
validation rule, but I cannot find it.

FWIW I don't think a CHECK constraint, and therefore Validation rule,
would work because of Jet's case-insensitive nature. For example, this:

CHECK (text_col = UCase(text_col))

would fail to stop lowercase letters, whereas this:

CHECK (text_col NOT LIKE '%[a-z]%')

would prevent upper- and lowercase :(

Jamie.

--
 
I'm not writing to satisfy your question but ass an MS Access user, your post
just gave me an idea. Thanks.
 
Back
Top