input mask for proper case on form

What's the input mask on the form to force proper case?

If user type LASTNAME, FIRSTNAME
or they type lastname, firstname

I want to convert to Lastname, Firstname

Thanks. 


0
Song
6/18/2007 1:04:45 AM
access.forms 6864 articles. 2 followers. Follow

4 Replies
2568 Views

Similar Articles

[PageSpeed] 27

On Jun 17, 9:04 pm, "Song Su" <csit...@hotmail.com> wrote:
> What's the input mask on the form to force proper case?
>
> If user type LASTNAME, FIRSTNAME
> or they type lastname, firstname
>
> I want to convert to Lastname, Firstname
>
> Thanks.

Private Sub Text1_AfterUpdate()

Me.Text1 = StrConv(Me.Text1, vbUpperCase)

End Sub

0
zionsaal
6/18/2007 1:27:07 AM
On Jun 17, 9:27 pm, zions...@gmail.com wrote:
> On Jun 17, 9:04 pm, "Song Su" <csit...@hotmail.com> wrote:
>
> > What's the input mask on the form to force proper case?
>
> > If user type LASTNAME, FIRSTNAME
> > or they type lastname, firstname
>
> > I want to convert to Lastname, Firstname
>
> > Thanks.
>
> Private Sub Text1_AfterUpdate()
>
> Me.Text1 = StrConv(Me.Text1, vbProperCase)
>
> End Sub

sorry:

 Private Sub Text1_AfterUpdate()

 Me.Text1 = StrConv(Me.Text1, vbProperCase)

 End Sub

0
zionsaal
6/18/2007 1:28:33 AM
can I put in on the forms property? it's a data entry form. thanks.

<zionsaal@gmail.com> wrote in message 
news:1182130113.850897.27130@o61g2000hsh.googlegroups.com...
> On Jun 17, 9:27 pm, zions...@gmail.com wrote:
>> On Jun 17, 9:04 pm, "Song Su" <csit...@hotmail.com> wrote:
>>
>> > What's the input mask on the form to force proper case?
>>
>> > If user type LASTNAME, FIRSTNAME
>> > or they type lastname, firstname
>>
>> > I want to convert to Lastname, Firstname
>>
>> > Thanks.
>>
>> Private Sub Text1_AfterUpdate()
>>
>> Me.Text1 = StrConv(Me.Text1, vbProperCase)
>>
>> End Sub
>
> sorry:
>
> Private Sub Text1_AfterUpdate()
>
> Me.Text1 = StrConv(Me.Text1, vbProperCase)
>
> End Sub
> 


0
Song
6/18/2007 1:54:22 AM
On Sun, 17 Jun 2007 18:54:22 -0700, "Song Su" <csitnnn@hotmail.com> wrote:

>can I put in on the forms property? it's a data entry form. thanks.

It's not a form property, it's VBA code. Open the form in design view; click
the ... icon by the AfterUpdate event line on the Events tab, and choose Code
Builder. Access will give you the Sub and End Sub lines, just edit one more
in:

Private Sub Text1_AfterUpdate()
Me!Text1 = StrConv(Me!Text1, vbProperCase)
End Sub

             John W. Vinson [MVP]
0
John
6/18/2007 2:19:25 PM
Reply:

Similar Artilces:

Cases and Workflow
We are using cases as problem reports... what is the best way to set up workflow so that when the case is created it is routed to a specific queue and the queue owner and account owner are emailed? and when the case is assigned to another queue that queue owner is emailed? create a worflow rule, on "create" then choose "assign to" action and choose the right queue you should then be able to choose the "send e-mail" action to notify the queue owner that a new case has been assigned to him and then the same to the account "Kristina Ledford" wrot...

alignment controls on the form
I want to align controls and labels on the form in different place. The controls and labels are hand in hand. When I select controls and labels to move or alignment all comes together. Are there any way to align controls only or labels only? Your informaiton is greate appreciated, In the upper left hand corner of any selected control or label, there is a larger "handle" (black box for sizing or moving). If you click and drag that box, you will move the control or label without affecting the other one. If you want to completely separate them, select the label and "Cut&q...

Is it possible to have a 'Delete' and 'Close' button on a form
Am i able to put a buttom on a form that says Delete and one that says Close. So after people finish entering in details through the form they can click on a 'Close' button. When they want to delete a client they can press the 'Delete' button. But have it to say "Are you sure you want to delete this entry" or something. Can a form also have a "Add Another Entry" on a form. They enter one, then click that button to add another. I know there are buttons for this, but im trying to make it extremely basic for people to use (not many people know how to use ac...

update form on change of field used in expression
I have one form based on a table, which calculates the unit costs based on the total price and number of units received. I created this form some time ago, and it works perfectly. The moment I change the total cost or units, it updates the unit price field accordingly. I created a similar form, also using an expression that determines the profit if sold at a price (the 'sold at' field). However this form does not change the calculated field until I F5 or refresh. I cannot see what I did differently in the original form, however would like this new form to update im...

How to add "Add existing..." button link in custom entity form?
Hi, I created a custom entity called ClassSchedule which has a parental, 1-Many relationship with Contact. Now, when I add new ClassSchedule, in the form, and click the Contact link, I want to have a button "Add Existing Contact" instead of just adding new contact in my ClassSchedule. Please advise on how to go about it. Thanks! ...

COMBO BOX or FORM!
HI, I have the following problem, I have a matrix of NxN and inside the matrix I want to add something like a combobox to give the users the capability to select the values from a predefined set of variables. How I can do it is a very easy way? Its possible to do it without Visual Basic? Here is an explample of what I want to do... Fruits State Color Apple Combo1 Combo2 Banana Combo1 Combo2 Then I define the combos as: Combo1 Good Bad Combo2 Red Yellow Many Thanks!!! Select Data > Validation. Choose List from the all...

display on form
i have table 1is perdiem primary key is empnbr table 2 is Employee with empnumber. I want to display the name of the employee on the form when their empnbr is input. When i created the form i used efirst and elast from the employee table and it displays correctly. Problem is it will not add records in the form view. I have looked at allowaddtions allowdeletes etc and all say yes. What am i missing? Perhaps something in this link will help. http://allenbrowne.com/ser-61.html jmm1954 wrote: >i have table 1is perdiem primary key is empnbr table 2 is Employee with >empnumbe...

Proper(text) function on entire worksheet?
Hi, I've acquired a huge Excel (2002) file which I'd like to use in a mailmerge but unfortunately all text entered previously is in uppercase. I've found the function Proper() which corrects uppercase to first letter as a capital then the rest as lowercase, but.... it appears that it can only be used to convert individual cells into a new/adjacent cell (i.e not simply convert the existing cell. Can anyone help me overcome this problem please? Cheers Bill Bill You could use this code and then select the data you wish to convert. You should be aware that Proper does have som...

Continuous form First record
On a continuous subform with only one field (suffix) I need to automatically enter 0 when the field gets focus and then set the focus to the next record in the subform, leaving the 2nd record blank and ready for the user to enter a number. I have tried in the field's OnGotFocus event the following code. If IsNull(Forms!InPutFrm!SuffixSubFrm!Suffix) Then Forms!InPutFrm!SuffixSubFrm!Suffix = 0 EndIf I had the code to go the next record after that but as you can quickly see, that puts a 0 in the second record and I get an error message that it created a duplicate. So I now need help...

Filter a Report with a Form
I am struggling a bit of code that dynamically filters elements in a report. I have a form with the following objects: lstCustomer, lstExecBroker, an Option Group named ‘fraTrader’, with three radio buttons; optOption for 'Option', optCross for 'Cross', and optBoth for 'Stock'. Also, I have cboSortOrder1, cboSortOrder2, and cboSortOrder3 as well as cboSortOrder1, cboSortOrder2, and cboSortOrder3, all of which control sort order. Finally, here’s the code: Private Sub cmdApplyFilter_Click() Dim varItem As Variant Dim strCustomer As String Dim strExecBrok...

Outlook 2010
Office Version: 14.0.4536.1000 OS: Windows 7, Build 7600 Issue: When you open a meeting or new meeting, the Room Finder sidebar overlaps the other fields (To, Subject, Location, Description/Main body, etc.) and prevents the creation of right boundary/edge of those controls/fields. This prevents the auto-carriage return when you hit try to type past the edge (because there is no edge) and blocks any data that is entered on the far right of those fields from being visible. Resizing the form ior sidebar appears to reload the form correctly because the right edge of those cont...

Running queries via forms
is there a good tutorial out there on how to make forms that run queries and reports? I've gotten all turned around on it all. On Thu, 22 Apr 2010 13:53:01 -0700, Dragon <Dragon@discussions.microsoft.com> wrote: >is there a good tutorial out there on how to make forms that run queries and >reports? I've gotten all turned around on it all. Well, forms don't "run" anything. You can use a reference to a form control on a Query, and base a Report on that query. Crystal's tutorial might be a good place to look, this is one of the techniques she d...

Display Charts Created In Excel In A Windows Form
Hi, I have several Excel files and each file has several Charts. I have a requirement where i have to display the chart with data points in a windows form. In my WinForms code iam able to access the chart object through the following code Excel.ChartObjects chCharts = (ChartObjects)oWorkSheet.ChartObjects(Missing.Value); Excel.ChartObject chChart = chCharts.Item(1); The problem is how do i use this ChartObject to be displayed in WinForm, I tried using the AxChartSpace control, but iam not able to add this chChartObject to it. The idea is to re-use the charts that has already been cr...

Move or Size Combo Box from forms toolbar With Cells
Hi : I would like to create a combo box from the forms toolbar and move or size it with cells so that if the rows or columns containing the box are hidden, the box will be hidden also. Is there a way to do this in excel? Thanks If you rightclick on the dropdown from the Forms toolbar, you can choose "format control". Then on the properties tab, you'll see that "move and size with cells" isn't available. Is there some overwhelming reason that you can't use the Combobox from the Control toolbox toolbar? It supports that option. steve-o wrote: > > H...

Dis/En-able combo text box and resetting a form
Sorry for the long-windedness! I am a coding amateur. I am having a few issues with a combo box and a "Reset" command button. I have a combo box called "PrimaryIssue", and option 6 in the box is "Other". I have been trying to set it up so that a text box is only enabled if the user selects the "Other" option. I have been having limited success with the following code (which I believe I found on this site somewhere): Private Sub PrimaryIssue_AfterUpdate() Dim varItm As Variant For Each varItm In PrimaryIssue.ItemsSelected If PrimaryIssu...

date in the form of yyyymmdd
other than entering 'yyyy-mm-dd' as date, are there ways to enter dates "yyymmdd" if I enter, for example, 20070101 and change the cell format to yyyymmdd and the cell becomes lots of #. Look here: http://xldynamic.com/source/xld.QDEDownload.html or here: http://www.cpearson.com/excel/DateTimeEntry.htm -- Kind regards, Niek Otten Microsoft MVP - Excel "kang" <kang@hao.com> wrote in message news:eExl1$WCIHA.1184@TK2MSFTNGP04.phx.gbl... | other than entering 'yyyy-mm-dd' as date, | are there ways to enter dates "yyymmdd" | | if I enter...

Value in Combox populates other fields in form
Hello, I have a form that has an unbound combobox (Company) that looks up company names in a table. Depending on the value of Company, it will automatically update other fields on the form: Address, Phone Number, State, etc. How do I go about doing this? Thanks! MN In After Update event for combo box you insert the code to test for the selected value and then set the other field values. E.g. Select Case Me!MyCombo Case "Microsoft" Me!SearchEngine = "Bing" Case "Google" Me!SearchEngine = "Google" ... End ...

Phone Number Input Mask 08-10-07
Hi. I tried editing the input mask property for my PhoneNumber field without success. I want the input mask to be: 999-999-999 - no parenthesis, just the dashes as placeholders. "JamesJ" <jjy@adelphia_darwin.net> wrote in message news:e7ONHm02HHA.3900@TK2MSFTNGP02.phx.gbl... > Hi. I tried editing the input mask property for my > PhoneNumber field without success. > I want the input mask to be: > 999-999-999 - no parenthesis, just the dashes as placeholders. > > How about: 000\-000\-0000 -- Smitty Somerset, PA Worked like champ. Thanks much &...

Pivot Chart
Hello, I am trying to create a stacked area Pivot Chart from a Pivot Table. I have negative values but am having trouble getting them to be displayed properly in the pivot chart. Currently, the negative values are displayed at the top and are "eating into" the positive series. I need the negative values to be displayed below the x-axis. Any help would be greatly appreciated. Aleksandr, This may be silly to ask, but... Did you try and adjust the y-axis scale from 0 to some number to a negative value (greater than the lowest negative value) to some positive value. Ex...

Set Project Accounting Purchase Order default to Blank Form
We would like the option to select "any" available form as the default for printing the Project Accounting Purchase Order. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default....

Form running very slow after upgrade
the Office has been upgraded from Office xp to Office 2007. the Access 2007 performance is very slow after upgraded from Access XP. the database is then upgraded from share file to SQL for faster performance. i still find the Access 2007 with SQL is still slower than Access xp running on access file. The database is just less than 10m size. the performance is much more slower after adding back some codes, like the following code sometimes, i can see the input to the database 1 character by 1 character. could anyone advise me whether my config or code is bad? does Access 2007 need hu...

Report with buttons to open forms
Is it possible have a report which is from a query (which is based on numerous other queries) that has buttons to open a specific form for each record on the report? I would like users be able to open the report and select a button which opens a specific form based on the results shown on the report. Any suggestions would be appreciated. Thanks. -- Donna N. Donna, Reports don't support functional buttons, nor their events. Your best bet is to create a form that lists your records, and use a button on it , to call a form for a specific value. You should be ...

Query Form
I have exported some data from the local MLS system into an Access database and want to run some statistics on the sales information, using a number of different queries which will feed graphs in Excel, etc... I have a form set up for choosing the data which include the city, the development, what kind of property it is (condo, single family residence, etc.) The problem I have is why no selection is made. For example, the query looks for a city selection from a drop-down box; if I choose a city, the query runs perfectly. If I do not choose a city - leaving it blank - the...

Create Form with Dropdown Combo Box
I want to create a form with dropdown combobox based off the Company Names. So, eVerytime i click on any of the companies it will populate the appropriate financial results for the two most recent quarters. I have a query result that shows Company Names with their Financial Information that they file quarterly. Some of the Companies shows more than two quarters of results. What is the best way and how to do it to show only two recent months. Thank you, Jay ...

How to tell if a form is open
I want to know how to return a value telling me whether or not a form is currently open. Something like this pseudo-code: If Forms![new appointment].Open = True Then 'send harry a box of chocolates' End If Cheers -- Nick Assuming Access 2000 or later: If CurrentProject.AllForms("new appointment").IsLoaded Then -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Nick Heath" <NickHeath@discussions.microsoft.com> wrote in messa...