View Full Version : Ensuring UpperCase


Rich_Lovina
02-06-2002, 04:36 PM
In my MainForm I use an After_Update event to create capitals, i.e.
Me.[MyCombo] = StrConv(Me.[MyCombo], vbUpperCase)

....but in the related table the text remains LowerCase.

Is there anyway to ensure reltable or MainForm hold UpperCase, irrespective of user's entry?

Pat Hartman
02-06-2002, 05:10 PM
Data that was entered or updated after you added the code to the AfterUpdate event should be fine. If you need a one-time fix for existing data, use an update query.

Rich_Lovina
02-06-2002, 06:17 PM
Dear Pat
Tks, that would be easier I guess, but I've jumped to so much VB, Ive forgotten the expression to build on the Update Query?
Any help, tks in advance.
Nb. Just searched the Help, tried
StrConv(UCase([Poscode]) in criteria, but no luck....must be close to this.

[This message has been edited by Rich_Lovina (edited 02-06-2002).]

Pat Hartman
02-07-2002, 04:40 AM
In the Update to cell put:

UCase(tblName.FieldName)


or You can use

StrConv(tblName.FieldName,1)

In SQL, I think that you need to use the vb constant values rather than their names. So, I replaced the constant name vbUpperCase with the literal value 1.

Rich_Lovina
02-07-2002, 07:07 PM
Tks Pat, remember now. 1st one similar to most programs.