473,836 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Input Mask help in Access 2007

6 New Member
When entering data in the table in datasheet mode I would like the first letter of first name to be automatically capitalized and also automatically capitalize the first letter of last name with a blank space between the first name and last name. Need help with the input mask in design mode.
Dec 31 '11 #1
11 4680
Stewart Ross
2,545 Recognized Expert Moderator Specialist
This cannot be done with input masks, which are really intended for numeric or date input. Input masks do not provide intelligent capitalistion and spacing of strings.

If you wish to pursue this you would have to take a programmed approach using VBA code in the After Update event of the control concerned.

-Stewart
Dec 31 '11 #2
NeoPa
32,584 Recognized Expert Moderator MVP
This is a lot more complicated than you need. Input Masks can handle letters etc, but how would you allow space for variable-length names? A more sensible approach would be to store the two names in separate fields and simply display them as one full name when required.

Input Mask help can be found using Context-Sensitive Help. You will find there all you need to specify the data as you want it.

Expand|Select|Wrap|Line Numbers
  1. Character Description
  2.     0     Digit (0 to 9, entry required, plus [+] and minus [-] signs not allowed).
  3.     9     Digit or space (entry not required, plus and minus signs not allowed).
  4.     #     Digit or space (entry not required; spaces are displayed as blanks while in Edit mode, but blanks are removed when data is saved; plus and minus signs allowed).
  5.     L     Letter (A to Z, entry required).
  6.     ?     Letter (A to Z, entry optional).
  7.     A     Letter or digit (entry required).
  8.     a     Letter or digit (entry optional).
  9.     &     Any character or a space (entry required).
  10.     C     Any character or a space (entry optional).
  11.   .,:;-/  Decimal placeholder and thousand, date, and time separators. (The actual character used depends on the settings in the Regional Settings Properties dialog box in Windows Control Panel).
  12.     <     Causes all characters to be converted to lowercase.
  13.     >     Causes all characters to be converted to uppercase.
  14.     !     Causes the input mask to display from right to left, rather than from left to right. Characters typed into the mask always fill it from left to right. You can include the exclamation point anywhere in the input mask.
  15.     \     Causes the character that follows to be displayed as the literal character (for example, \A is displayed as just A).
Something like :
Expand|Select|Wrap|Line Numbers
  1. >L<??????????????????????
for the Given Name, and :
Expand|Select|Wrap|Line Numbers
  1. >L<CCCCCCCCCCCCCCCCCCCCCC
for the Family name. Of course, that doesn't allow for McDonald or O'Reilly, but it's what you have asked for.
Dec 31 '11 #3
Amar Sapra
6 New Member
Dear Mr. NeoPa:

I agree with you in storing the first name and last name in two separate fields. Then combine the values of two fields in third field called Full_Name using expression of combing text values.

Thank you for your help!!
Jan 3 '12 #4
Amar Sapra
6 New Member
Dear Mr. Stewart Ross:

I agree with Mr. NeoPa in storing the first name and last name in two separate fields. Then combine the values of two fields in third field called Full_Name using expression of combing text values. It worked well when I tried it.

Thank you for your response.
Jan 3 '12 #5
NeoPa
32,584 Recognized Expert Moderator MVP
I'm glad that helped Amar, but don't forget to look out for names (especially Family Names) that are not all alphabetic ;-)
Jan 3 '12 #6
Amar Sapra
6 New Member
Jan 03, 2012

Dear Mr. NeoPa:

I certainly agree with you, fortunately both the first and last names consist of all text values. If there were numeric values then I would substitute ( ? ) with ( 0 ) zero and ( 9 ).

Mr. Stewart Ross mentioned that using VBA code I could get the same results which I don’t doubt. But since I am not familiar with VBA script and coding I settled for your option.

Again thank for cautioning me for the numeric values.
Jan 3 '12 #7
NeoPa
32,584 Recognized Expert Moderator MVP
Stewart warned that your original question could not be handled using Input Masks, and indeed it couldn't. Changing the requirement somewhat though, allows a more reliable use of them for your separated fields.
Jan 3 '12 #8
Amar Sapra
6 New Member
Jan 03, 2012

Dear Mr. Stewart Ross:

You and Mr. NeoPa have raised my curiosity – can you recommend a book on VBA coding and script for a beginner.
Jan 3 '12 #9
NeoPa
32,584 Recognized Expert Moderator MVP
Here are some tutorial links that may help you :
  1. Microsoft Access Tutorial.
  2. Microsoft Access Tutorials (Strive4Peace).
  3. Microsoft Office Tutorials.
  4. VBA Tutorial (Excel).

They may not all suit you but I expect you'll find some of them very helpful.
Jan 3 '12 #10

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

Similar topics

6
12719
by: dude | last post by:
hello how would i make an input mask that only makes the first letter a capitol one? i've been playing around and testing various masks, also tried the wizard, but i've had no luck. could anyone help, many thanks in advance.
2
5060
by: Serious_Practitioner | last post by:
Hello, and thank you in advance for your help. Again. I want to enter the month and day portions only of a date into a table field. The idea is that I'll use the information later to generate a list of birthdays by using a query (all the birthdays in January, all in February and so forth). The organization doesn't ask for dates of birth - the only information available is the day and month - 8/4, for example is my birthday and that's all...
2
3729
by: johnp | last post by:
Hi, Our Tech department updated users to Office 2003 this week. Now the input mask in one of the applications is showing up as: (###) ###-### The input mask wizard works correctly when I redo the mask. But in form view, the mask appears reverts to the previous.
7
7080
by: F. Michael Miller | last post by:
I have a db with Access front end, sql back, linked tables. I need to be able to change input masks at the table level in code. Any ideas? Thanks!
3
3346
by: AA Arens | last post by:
When I want the first character of a field to be Uppercased, I need to make an input mask, like >L< followed by ??????? for example. But this mask creates ____ in an unfilled field, which I don't like. How to get the fist character uppercased without an input mask or without ____ (underscores). When I click with the mouse on an empty field, it won't go to the far left side, cause of the input mask. How to avoid it? Bart
2
4547
by: jmarr02s | last post by:
I need my Date field to possess the following format: Jan-05-1999 How do I change the Date Format/Input Mask to accomplish this? Thanks! John
5
5372
by: ARC | last post by:
Just found out something interesting with Access 2007... In table design, if you set a memo field to the new rich text option, and put that control on a form, set the control to rich text, you can only use the text formatting menus IF the control is on a parent form! If the control is placed on a form that is a subform, the mini format toolbar, and the access toolbar will not work! However, if you place the control on a self-contained...
7
3529
desklamp
by: desklamp | last post by:
I'm a total Access newbie, please bear with me! Using Win2K/Access 2003. I'm trying to create a table in which I can store IP addresses and other information. According to Microsoft, there is no native way of converting an IP address to an integer/long number (which is much more efficient to index and search). After searching, I found a function which is able to take either an IP address or integer and convert it to the other. In the...
1
12253
by: Doug | last post by:
Hi, I created a short date field. The format is dd/mm/yyyy when displayed. The input mask is set to 99/99/00;0 (default, I didn't type anything). If I edit an existing date, say change 12/14/2007 to 12/15/2007, I get an error "the value you entered isn't appropriate for the input mask." I have to delete the "20" in the year to get it accepted, and then it puts the 20 right back. (I have the field set to required.) I changed 99/99/00;0...
21
7992
by: DanicaDear | last post by:
I've been trying to figure this out for three weeks. I've been sleeping on it. Not getting answers, just losing sleep. ;-) In a table, I have a field COMPANY_EMAIL. In this field I want to allow up to 8 characters, use the same domain always, and in a form be able to click and open an email to this customer. I have tried this in numerous ways, and I think it's occuring to me finally I can't do everything in one place. I think I might...
0
9661
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10831
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10582
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7778
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.