Only Upper Case in Table

B

Bob

--
Is it possible that the table to convert everything in that field to
uppercase, so even if you type in lower case through the form it will
convert to uppercase in table...Thanks Bob






..........Jenny Vance
 
B

Bob

Jamie Collins said:
Of course, an Input Mask will not prevent bad data from getting into
the table, therefore there should also be a validation rule (or CHECK
constraint) at the Jet engine level, noting that Access/Jet text
columns are case-insensitive e.g.

CREATE TABLE Test (
text_col VARCHAR(10) NOT NULL,
CONSTRAINT text_col__no_uppercase
CHECK (0 = INSTR(1, text_col, 'A', 0) + INSTR(1, text_col, 'B', 0) +
INSTR(1, text_col, 'C', 0) + INSTR(1, text_col, 'D', 0) + INSTR(1,
text_col, 'E', 0) + INSTR(1, text_col, 'F', 0) + INSTR(1, text_col,
'G', 0) + INSTR(1, text_col, 'H', 0) + INSTR(1, text_col, 'I', 0) +
INSTR(1, text_col, 'J', 0) + INSTR(1, text_col, 'K', 0) + INSTR(1,
text_col, 'L', 0) + INSTR(1, text_col, 'M', 0) + INSTR(1, text_col,
'N', 0) + INSTR(1, text_col, 'O', 0) + INSTR(1, text_col, 'P', 0) +
INSTR(1, text_col, 'Q', 0) + INSTR(1, text_col, 'R', 0) + INSTR(1,
text_col, 'S', 0) + INSTR(1, text_col, 'T', 0) + INSTR(1, text_col,
'U', 0) + INSTR(1, text_col, 'V', 0) + INSTR(1, text_col, 'W', 0) +
INSTR(1, text_col, 'X', 0) + INSTR(1, text_col, 'Y', 0) + INSTR(1,
text_col, 'Z', 0))
);

Jamie.
Can I change it to UCASE at report as some of my reports I do need Upper and
Lower from table
The Report I want to change has,
Name: tbOwnerName
Source Control: OwnerName

Thanks for your help....Bob
 
V

Van T. Dinh

In that case, you only need to change the ControlSource to:

= UCase([OwnerName])

including the equal sign (I think).

Personally, I prefer to do this sort of calculations in the Query being used
as the RecordSource for the Report. You can simple create a SELECT query
with all required Field and instead of using the Field OwnerName, you can
create a Calculated Field:

CapOwnerName: UCase([OwnerName])

and use CapOwnerName as the ControlSource.
 
B

Bob

Thanks Van worked perfect with = sign .....Bob Vance

Van T. Dinh said:
In that case, you only need to change the ControlSource to:

= UCase([OwnerName])

including the equal sign (I think).

Personally, I prefer to do this sort of calculations in the Query being
used as the RecordSource for the Report. You can simple create a SELECT
query with all required Field and instead of using the Field OwnerName,
you can create a Calculated Field:

CapOwnerName: UCase([OwnerName])

and use CapOwnerName as the ControlSource.

--
HTH
Van T. Dinh
MVP (Access)



Bob said:
Can I change it to UCASE at report as some of my reports I do need Upper
and Lower from table
The Report I want to change has,
Name: tbOwnerName
Source Control: OwnerName

Thanks for your help....Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top