I have a database Form which includes two controls -
Job Code varchar(3) Pattern Field (Job Code is an
abbreviation of Job Code Name)
Job Code Name varchar(25) List Box
The idea is that the user can enter the Job Code and the List Box will
display the Name. Alternatively, the user can drop down the List Box,
choose a Name and the Job Code will be displayed
I wanted to force upper case in Job Code, so I entered ‘AAA’ in the Pattern
Field Edit Mask. This works fine for 3 character Job Codes, but some of
them are just two characters. For these, Job Code is displayed as upper
case, but a space is appended to make up the 3 characters. This means that
the Job Code is not recognised by the List Box, and as well, I get a
referential integrity error when I try to save the record, the reason being
that for example, Job Code ‘SP ’ is not the same as ‘SP’.
So my question is, can I change the Edit Mask in some way to get around
this problem?
As far as I can see, this doesn’t seem to be possible. My only solution is
to change the 2 char Job Codes to 3 chars. I have only 7 with 2 chars in
the lookup table, but there are a lot of these in the Jobs table.
Relatively easy to do with an update query, but I didn’t want to do that,
if there was an simpler solution.
Thanks,
Noel