Upper case for control source

G

Guest

Hello

A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based that is
attached to the report. The financial years are FY05 for 2005, FY06 for 2006
etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on the cap
lock key.
 
A

Allen Browne

If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:Don't do that with memo fields: it will truncate them at 255 characters.

If you actually want to convert the entries so they are *stored* as upper
case, use the AfterUpate event procedure of the control to convert them.
Example:
Me.Text1 = UCase(Me.Text1)

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

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

Alylia said:
A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based that
is
attached to the report. The financial years are FY05 for 2005, FY06 for
2006
etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on the
cap
lock key.
 
G

Guest

I don't get waht you are suggesting.

Which property should be set to what?

please don't forget I am using label box

Allen Browne said:
If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:Don't do that with memo fields: it will truncate them at 255 characters.

If you actually want to convert the entries so they are *stored* as upper
case, use the AfterUpate event procedure of the control to convert them.
Example:
Me.Text1 = UCase(Me.Text1)

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

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

Alylia said:
A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based that
is
attached to the report. The financial years are FY05 for 2005, FY06 for
2006
etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on the
cap
lock key.
 
A

Allen Browne

I guess I don't understand either.

It cannot be a Label control. Labels do not have a Control Source, so if it
is a label you cannot set its Control Source to:
=[Enter Financial_Period]

If it is a text box (regardless of its name), set the After Update property
of the text box to:
[Event Procedure]
Then click the Build button (...) beside this.
Access opens the code window.
The line of code goes in there, between the "Private Sub..." and "End Sub"
lines.

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

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

Alylia said:
I don't get waht you are suggesting.

Which property should be set to what?

please don't forget I am using label box

Allen Browne said:
If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:Don't do that with memo fields: it will truncate them at 255 characters.

If you actually want to convert the entries so they are *stored* as upper
case, use the AfterUpate event procedure of the control to convert them.
Example:
Me.Text1 = UCase(Me.Text1)

Alylia said:
A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based
that
is attached to the report. The financial years are FY05 for 2005, FY06
for 2006 etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on
the
cap
lock key.
 
A

Allen Browne

To try to be a bit clearer:

1. Adding the right-angle-bracket character to the Format property of the
text box on the report will make the report print the value of that text box
in upper case.

2. The line of code goes in the property of the text box on the *form*. This
suggestion does not apply if [Enter Financial_Period] is a paramter in a
query (which is probably where I confused you.)

Therefore the first suggestion is probably all you need.

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

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

Allen Browne said:
I guess I don't understand either.

It cannot be a Label control. Labels do not have a Control Source, so if
it is a label you cannot set its Control Source to:
=[Enter Financial_Period]

If it is a text box (regardless of its name), set the After Update
property of the text box to:
[Event Procedure]
Then click the Build button (...) beside this.
Access opens the code window.
The line of code goes in there, between the "Private Sub..." and "End Sub"
lines.

Alylia said:
I don't get waht you are suggesting.

Which property should be set to what?

please don't forget I am using label box

Allen Browne said:
If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:

Don't do that with memo fields: it will truncate them at 255 characters.

If you actually want to convert the entries so they are *stored* as
upper
case, use the AfterUpate event procedure of the control to convert them.
Example:
Me.Text1 = UCase(Me.Text1)


A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based
that
is attached to the report. The financial years are FY05 for 2005, FY06
for 2006 etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on
the caplock key.
 
G

Guest

Thanks for your support.

You are right the control was not a label box but a text box. Sorry for the
confusion. However, on reports there are no event procedures for text boxes.

Please advice

Allen Browne said:
I guess I don't understand either.

It cannot be a Label control. Labels do not have a Control Source, so if it
is a label you cannot set its Control Source to:
=[Enter Financial_Period]

If it is a text box (regardless of its name), set the After Update property
of the text box to:
[Event Procedure]
Then click the Build button (...) beside this.
Access opens the code window.
The line of code goes in there, between the "Private Sub..." and "End Sub"
lines.

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

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

Alylia said:
I don't get waht you are suggesting.

Which property should be set to what?

please don't forget I am using label box

Allen Browne said:
If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:

Don't do that with memo fields: it will truncate them at 255 characters.

If you actually want to convert the entries so they are *stored* as upper
case, use the AfterUpate event procedure of the control to convert them.
Example:
Me.Text1 = UCase(Me.Text1)


A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based
that
is attached to the report. The financial years are FY05 for 2005, FY06
for 2006 etc.

If a user enter fy05 or fy06, I would like assistance on whether these
entries can be converted into upper case if the user fails to turn on
the
cap
lock key.
 
A

Allen Browne

Hopefully you saw the follow up I posted, explaining that the 2nd suggestion
is not applicable for reports.

Just take the first suggestion of setting the text box's Format property to:
--
Allen Browne - Microsoft MVP. Perth, Western Australia.

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

Alylia said:
Thanks for your support.

You are right the control was not a label box but a text box. Sorry for
the
confusion. However, on reports there are no event procedures for text
boxes.

Please advice

Allen Browne said:
I guess I don't understand either.

It cannot be a Label control. Labels do not have a Control Source, so if
it
is a label you cannot set its Control Source to:
=[Enter Financial_Period]

If it is a text box (regardless of its name), set the After Update
property
of the text box to:
[Event Procedure]
Then click the Build button (...) beside this.
Access opens the code window.
The line of code goes in there, between the "Private Sub..." and "End
Sub"
lines.

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

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

Alylia said:
I don't get waht you are suggesting.

Which property should be set to what?

please don't forget I am using label box

:

If you just want to *display* them in upper case, just set the Format
property of the text box on the report to:

Don't do that with memo fields: it will truncate them at 255
characters.

If you actually want to convert the entries so they are *stored* as
upper
case, use the AfterUpate event procedure of the control to convert
them.
Example:
Me.Text1 = UCase(Me.Text1)


A label box on one of reports has in its control source =[Enter
Financial_Period] which is the criterion on which the query is based
that
is attached to the report. The financial years are FY05 for 2005,
FY06
for 2006 etc.

If a user enter fy05 or fy06, I would like assistance on whether
these
entries can be converted into upper case if the user fails to turn
on
the
cap
lock key.
 

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