what input mask will put capitals at the beginning of any word?

G

Guest

I have a problem, i am doing an A level and my teacher doesnt know the answer
to my question. I have a field called street name, now i want to put an input
mask syntax that will putt a capitals at the beginning of each word e.g.
'cooks lane' would become 'Cooks Lane'. I know how to do it for one word. It
would be >L<???????(however many characters left in field) but for two words
i have no idea as if i had a field size of 12 and i put >L<?????>L<????? it
would only make the first and seventh letter capital.
 
G

Guest

Try this: Don't use the input mask, but instead put this in the AfterUpdate
Event of the form control.

strStreet1 = StrConv(strStreet1, vbProperCase)

Change the name of the control to match yours.
 
G

Guest

im sorry, im not that well educated in microsoft access i would apreciate it
alot if you or anybody else for that matter who understands this to explain
it as i do not know where to find the form controll or where the after event
update controll is found... THANK YOU THOUGH! : )
 
D

Duane Hookom

All objects (including text boxes on forms) have properties. Some of these
properties are "Event" properties. You can use these properties to enter
code (or macros) that will be run when the event happens.

Jim suggested the After Update event. Open your properties for your control
and find this event. You can click the builder button [...] to the right of
the event and select the option to write some code. The code window that
opens will contain the event first and last lines of code. You need to take
code like Jim suggested and enter it into the middle of the code provided.

Since you didn't provide the name of your control, Jim used "strStreet1" as
the placeholder in his sample. I actually prefer to use something like:

Me.txtStreet = StrConv(Me.txtStreet, vbProperCase)
 
G

Guest

I'm going to make an assumption here that you are trying to work directly in
a table. If you are, then you really could use some direction on how to set
up a database. Good database structure will not allow anyone to add/edit a
table directly.

Like Duane pointed out, forms (and other objects) are used to
add/edit/modify data in a database. Input masks are fine for the table and
provide usually adequate perameters for data entry. Your question, though,
would be better handled through a form based on your table.

I would suggest you do a search on how to set up a properly normalized
database. Trying to explain it here would take up way too much time and space.
 
G

Guest

I would just like to thank you for giving your time to reply to my queries. i
will try and do as you have suggested and instructed and if all else fails i
will hope that my teacher would be able to use your given responses and
instruct me herself. I will reply soon just to let you know if i have
achieved what i needed with more thanx for you help.
PEACE and PC's : )
 
G

Guest

Your welcome Alex,
This discussion group is the best I've ever run across and the MVPs are the
greatest. Not many questions go unanswered. I've learned more here than all
the classes I've taken for Access.

Tip for your next question for the group: Provide the OS (WinXP, Win98,
etc.) you are using and which Access version you are using (Access 97, Access
2000, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top