Lowercase

mike60smart

Registered User.
Local time
Today, 07:43
Joined
Aug 6, 2017
Messages
1,980
Hi
I have these Controls in a Continuous Form:-

Control1 "Source" is in the following Format "Ingram"
Control2 "Type " is in the following Format "ebook"

However when I create the following Control :- T: [Source] & "-" & [Type]

The data is displayed as "Ingram - Ebook" ?

Is there a way to make it display as "Ingram - ebook" ?

Any help appreciated
 
Three functions that work in Access are shown here (even though it is an Excel article.)


UCase, LCase, and StrConv work quite well for case conversion.
 
Three functions that work in Access are shown here (even though it is an Excel article.)


UCase, LCase, and StrConv work quite well for case conversion.
Hi Doc_Man

What I am not understanding is why the Type Control display as Lowercase.

Why when it is included as part of the string does it Capitalise the Type?
 
Type is a reserved word and using it a a field name can produce unexpected results

Also check the format property for the table field - it may be formatted to show lower case
 
Type is a reserved word and using it a a field name can produce unexpected results

Also check the format property for the table field - it may be formatted to show lower case
Hi CJ

You are correct in getting me to check the Format in the table. It is set to Lowercase.
 
Type is a reserved word and using it a a field name can produce unexpected results

Also check the format property for the table field - it may be formatted to show lower case
Hi CJ

If I remove the formatting from the table how can I change the current Type Control to Lowercase?
 
If I remove the formatting from the table how can I change the current Type Control to Lowercase?
If you just want to format the value as lowercase, then you can use the same approach as with the format of the table column: Enter < in the Format property of the control.
 
That won’t work as it is being concatenated
 
That won’t work as it is being concatenated
Oh, thanks, I forgot about the concatenation aspect of the question.
Nonetheless, formatting also works with the concatenation if this is intended:
Controlsource = [Source] & "-" & Format([Type];"<")
As this is just an expression and not the value stored in the DB, it doesn't make a difference to actually converting to lowercase:
Controlsource = [Source] & "-" & LCase([Type])
 
You could also run an update query to update all the values to lower case - probably also need a routine in the control to convert to lower case when a value is added or amended, or a routine that limits the accepted characters to lower case.
 
You could also run an update query to update all the values to lower case
Sure, but so far Mike only mentioned "Format" and "Display". So, I assume he doesn't want to change the stored data but only displayed text.
 
well - he's got enough to make a decision about what he actually needs
 
This is a problem virtually as old as coding! I've had to do it in COBOL, PL/I, dbase as well as various variants of Basic.

In a personnel file (of some 750,000 persons) you can imagine the problems with formatting for display such surnames as hyphenated names , McF.. , MacT..., d'N... , - of that Ilk, ff... etc not to mention the increasing incidence of non English name (all of which were actually stored in upper case as the time).

None of the formatting options are more than 90%+ successful overall, and we ended up with in-house routines to evaluate all known surname spelling variants.
 
Not to mention Mike de la Smart :giggle:
Hi Everyone
I ended up not concatenating the Controls.
I just Displayed the 2 Controls as they currently are and put an Unbound Control between them
with ="-"
Works as I want it to.
many thanks for all the tips
 
The data is displayed as "Ingram - Ebook" ?

Is there a way to make it display as "Ingram - ebook" ?
Concatenation does not change the case of words.
This should tell you that the data is not actually stored the way you think it is. Check the table and form controls for formatting.
 
Concatenation does not change the case of words.
This should tell you that the data is not actually stored the way you think it is. Check the table and form controls for formatting.
Hi Pat

The data is stored as follows in the table.
 

Attachments

  • Stored.png
    Stored.png
    5.3 KB · Views: 22
The data is stored as follows in the table.
Did you look at the format property of the column? Concatenation does not do this. If there is no format property, then I would guess it was corruption and rebuild the table.
 
There are times when you just take the workaround but other times you need to dig deeper. This is a symptom of some other problem.
 

Users who are viewing this thread

Back
Top Bottom