By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

Capitalise first letter of Town

P: 59
I have a text box with the following:-

=Trim([Address Line 1] & (", "+[Address Line 2]) & (", "+[Address Line 3]) & (", "+[Address Line 4]) & (", "+[Town]) & (", "+[Property.Post Code]))

What I would like is for [Town] to be an initial capital and not all caps. Any help much appreciated.
Feb 2 '17 #1

✓ answered by Seth Schrock

For future reference, MS Access questions need to be asked in the Access forum. I have requested a moderator to move this to the correct forum, but in the meantime I will answer here.

Now that I know this isn't a VB.NET application, try this instead:
Expand|Select|Wrap|Line Numbers
  1. =Trim([Address Line 1] & (", "+[Address Line 2]) & (", "+[Address Line 3]) & (", "+[Address Line 4]) & (", "+StrConv([Town], 3)) & (", "+[Property.Post Code])) 

Share this Question
Share on Google+
8 Replies


Seth Schrock
Expert 2.5K+
P: 2,930
Try something like this:
Expand|Select|Wrap|Line Numbers
  1. strName = StrConv(strName, VbStrConv.ProperCase)
Feb 2 '17 #2

P: 59
Where would I put this?
Feb 3 '17 #3

Seth Schrock
Expert 2.5K+
P: 2,930
Try adding it to your current textbox like this:
Expand|Select|Wrap|Line Numbers
  1. =Trim([Address Line 1] & (", "+[Address Line 2]) & (", "+[Address Line 3]) & (", "+[Address Line 4]) & (", "+StrConv([Town], VbStrConv.ProperCase)) & (", "+[Property.Post Code])) 
Feb 3 '17 #4

P: 59
I've put this in but in the form proper is #Name?. I've noticed when I input the code ... (", "+StrConv([Town], VbStrConv.ProperCase)) changes to ... (", "+StrConv([Town],[VbStrConv].[ProperCase])) in the Control Source.
Feb 3 '17 #5

Seth Schrock
Expert 2.5K+
P: 2,930
Is this a VB.NET application or an MS Access database?
Feb 3 '17 #6

P: 59
It is MS Access database.
Feb 3 '17 #7

Seth Schrock
Expert 2.5K+
P: 2,930
For future reference, MS Access questions need to be asked in the Access forum. I have requested a moderator to move this to the correct forum, but in the meantime I will answer here.

Now that I know this isn't a VB.NET application, try this instead:
Expand|Select|Wrap|Line Numbers
  1. =Trim([Address Line 1] & (", "+[Address Line 2]) & (", "+[Address Line 3]) & (", "+[Address Line 4]) & (", "+StrConv([Town], 3)) & (", "+[Property.Post Code])) 
Feb 3 '17 #8

P: 59
My apologies, I did not realise I was posting on a VB forum. It works perfectly. Thank you.
Feb 3 '17 #9

Post your reply

Sign in to post your reply or Sign up for a free account.