Pcase() Function

  • Thread starter Thread starter Denver
  • Start date Start date
D

Denver

I have Data Entry Form i want to apply a Proper Case Function.
Can anyone help me how to accompish this to some of my fields?

thanks
 
Denver said:
I have Data Entry Form i want to apply a Proper Case Function.
Can anyone help me how to accompish this to some of my fields?

There is no Pcase() built into Access.

In the VBA window, see help on StrConv().
 
Allen,

I have seen on the help window in VBA code window the Strconv()
but i dont know how to write my VBA code or what event do i need to use.

I have a form with a subform and has a Filed name 'Description' i want to
apply this Strconv() code in this filed what would be my be look like? thanks
for the help again.
i am using access 2003

thanks

***********************
 
In the Query that support the subform enter ProperDescription:
strConv(Description,,,,) and use the value that does proper case.
 
So, in the Field row in query design, enter:
StrConv([SomeField], 3)

In practice, this is of limited use. Doesn't work well for names such as:
- McDonald
- van Leen
- O'Brien
and so on.
 
i try to open my query in design view and click Update Query
i put this StrConv([Description],3) under 'Description' row field
in my database
it doesnt convert all the description to proper case.
Im doing the right thing? or do i miss some SQL?
when i see the result it display only the Description Row field and the
proper case function is not working.


thanks for any help again


Allen Browne said:
So, in the Field row in query design, enter:
StrConv([SomeField], 3)

In practice, this is of limited use. Doesn't work well for names such as:
- McDonald
- van Leen
- O'Brien
and so on.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Mike Painter said:
In the Query that support the subform enter ProperDescription:
strConv(Description,,,,) and use the value that does proper case.
 
In query design, you type:
StrConv([Description],3)
into the Field row (not the Criteria row.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Denver said:
i try to open my query in design view and click Update Query
i put this StrConv([Description],3) under 'Description' row field
in my database
it doesnt convert all the description to proper case.
Im doing the right thing? or do i miss some SQL?
when i see the result it display only the Description Row field and the
proper case function is not working.


thanks for any help again


Allen Browne said:
So, in the Field row in query design, enter:
StrConv([SomeField], 3)

In practice, this is of limited use. Doesn't work well for names such as:
- McDonald
- van Leen
- O'Brien
and so on.

Mike Painter said:
In the Query that support the subform enter ProperDescription:
strConv(Description,,,,) and use the value that does proper case.

Denver wrote:
Allen,

I have seen on the help window in VBA code window the Strconv()
but i dont know how to write my VBA code or what event do i need to
use.

I have a form with a subform and has a Filed name 'Description' i
want to apply this Strconv() code in this filed what would be my be
look like? thanks for the help again.
i am using access 2003

thanks

***********************
:

I have Data Entry Form i want to apply a Proper Case Function.
Can anyone help me how to accompish this to some of my fields?

There is no Pcase() built into Access.

In the VBA window, see help on StrConv().
 
Thanks Mr. Allen Browne.

Allen Browne said:
In query design, you type:
StrConv([Description],3)
into the Field row (not the Criteria row.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Denver said:
i try to open my query in design view and click Update Query
i put this StrConv([Description],3) under 'Description' row field
in my database
it doesnt convert all the description to proper case.
Im doing the right thing? or do i miss some SQL?
when i see the result it display only the Description Row field and the
proper case function is not working.


thanks for any help again


Allen Browne said:
So, in the Field row in query design, enter:
StrConv([SomeField], 3)

In practice, this is of limited use. Doesn't work well for names such as:
- McDonald
- van Leen
- O'Brien
and so on.

In the Query that support the subform enter ProperDescription:
strConv(Description,,,,) and use the value that does proper case.

Denver wrote:
Allen,

I have seen on the help window in VBA code window the Strconv()
but i dont know how to write my VBA code or what event do i need to
use.

I have a form with a subform and has a Filed name 'Description' i
want to apply this Strconv() code in this filed what would be my be
look like? thanks for the help again.
i am using access 2003

thanks

***********************
:

I have Data Entry Form i want to apply a Proper Case Function.
Can anyone help me how to accompish this to some of my fields?

There is no Pcase() built into Access.

In the VBA window, see help on StrConv().
 
yes iam succesful in accomplishing it, but the problem now is that when i add
a records on my query for example i can write anything under 'Description'.
or i cannot even modify existing records under 'Description' Field.

What else do i need to accomplish? i know i can raise this question to
Access Group communities but i'd like to this ask from you who give me the
hint.

thanks again... i appreciate...

****************************************************
Allen Browne said:
In query design, you type:
StrConv([Description],3)
into the Field row (not the Criteria row.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Denver said:
i try to open my query in design view and click Update Query
i put this StrConv([Description],3) under 'Description' row field
in my database
it doesnt convert all the description to proper case.
Im doing the right thing? or do i miss some SQL?
when i see the result it display only the Description Row field and the
proper case function is not working.


thanks for any help again


Allen Browne said:
So, in the Field row in query design, enter:
StrConv([SomeField], 3)

In practice, this is of limited use. Doesn't work well for names such as:
- McDonald
- van Leen
- O'Brien
and so on.

In the Query that support the subform enter ProperDescription:
strConv(Description,,,,) and use the value that does proper case.

Denver wrote:
Allen,

I have seen on the help window in VBA code window the Strconv()
but i dont know how to write my VBA code or what event do i need to
use.

I have a form with a subform and has a Filed name 'Description' i
want to apply this Strconv() code in this filed what would be my be
look like? thanks for the help again.
i am using access 2003

thanks

***********************
:

I have Data Entry Form i want to apply a Proper Case Function.
Can anyone help me how to accompish this to some of my fields?

There is no Pcase() built into Access.

In the VBA window, see help on StrConv().
 
I'm not clear if you are wanting to use an Update query (Update on Query
menu in query design) to change existing values, or if you want to use the
AfterUpdate event procedure of the text box on a form to change the value
before it gets saved in a table.
 
this is how i do it, under 'Description' row field

Drawing Description:StrConv([Description],3)

i did not use the Update Query menu. do i make some mistakes here?

thanks again Mr. Allen Browne

***********
 
Since I'm not clear which one you want, I've given you 3 choices:

- a calculated field (which can't be updated.)

- an update query (to correct existing records)

- the AfterUpdate event of the control on the form (to fix up the value
before it gets into the table.)

Use whichever one applies.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Denver said:
this is how i do it, under 'Description' row field

Drawing Description:StrConv([Description],3)

i did not use the Update Query menu. do i make some mistakes here?

thanks again Mr. Allen Browne

***********

Allen Browne said:
I'm not clear if you are wanting to use an Update query (Update on Query
menu in query design) to change existing values, or if you want to use
the
AfterUpdate event procedure of the text box on a form to change the value
before it gets saved in a table.
 
Denver said:
this is how i do it, under 'Description' row field

Drawing Description:StrConv([Description],3)

i did not use the Update Query menu. do i make some mistakes here?


I think you have to use the UPDATE query to fix the existing
records. (Be sure to have a verified good backup before
making this kind of global change.)

AND you need to use the description text box's AfterUpdate
event to fix up any new/edited descriptions when they are
entered.

If you are not using a form to create/edit these records,
then your request is doomed. Note that allowing users,
including yourself, to edit any data directly in a
table/query's datasheet view is a Bad Thing!
 
Back
Top