CAPS and Date/Time formatting

S

Stephanie

Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!
 
F

fredg

Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

The > in the Format property merely displays the data in upper case,
but it is still stored however it was entered.

You can (on the report) use an unbound text control:
=Ucase([State])

A better solution is to have a table of State names and use it as the
rowsource of a Combo Box on your form to select the state. There are
only 50 states, so properly capitalizing each state name once is all
you would need do.
In an Update query:

Update StateTable Set StateTable.StateName = UCase([StateName])

Now you avoid your original problem entirely. Whenever you select the
state in the combo box, it's already in upper case.

I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!

=Format([SchedDate],"dddd, mmmm d, yyyy") & " at " &
Format([ShiftStart],"h:nn AM/PM")
 
S

Stephanie

Fred,
Thanks for the reply. The date/time formatting was perfect!

As for the State in CAPS issue- I do like the idea of having a State table,
except we have international members as well. So a Canadian address City,
State, Zip and Country might be:
OTTAWA ON K1A 0B1
CANANDA

And I admit, sometimes ON is spelled out in the db as Ontario.
Then there is an entry for: Ostroda 14-100 POLAND where Ostroda is the
State.

So, I'm not sure what the standard should be for a City, State, Zip and
Country field. I'd appreciate suggestions. I can certainly update the db to
Uppercase (since you showed me how!).

In my query, I'm using:
[City1] & ", " & [StateOrProvince1] & " " & [PostalCode1] AS Address. I
tried using UCase[StateOrProvince1] but that didnt' work...

Thanks for your help!

fredg said:
Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

The > in the Format property merely displays the data in upper case,
but it is still stored however it was entered.

You can (on the report) use an unbound text control:
=Ucase([State])

A better solution is to have a table of State names and use it as the
rowsource of a Combo Box on your form to select the state. There are
only 50 states, so properly capitalizing each state name once is all
you would need do.
In an Update query:

Update StateTable Set StateTable.StateName = UCase([StateName])

Now you avoid your original problem entirely. Whenever you select the
state in the combo box, it's already in upper case.

I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!

=Format([SchedDate],"dddd, mmmm d, yyyy") & " at " &
Format([ShiftStart],"h:nn AM/PM")
 
F

fredg

Fred,
Thanks for the reply. The date/time formatting was perfect!

As for the State in CAPS issue- I do like the idea of having a State table,
except we have international members as well. So a Canadian address City,
State, Zip and Country might be:
OTTAWA ON K1A 0B1
CANANDA

And I admit, sometimes ON is spelled out in the db as Ontario.
Then there is an entry for: Ostroda 14-100 POLAND where Ostroda is the
State.

So, I'm not sure what the standard should be for a City, State, Zip and
Country field. I'd appreciate suggestions. I can certainly update the db to
Uppercase (since you showed me how!).

In my query, I'm using:
[City1] & ", " & [StateOrProvince1] & " " & [PostalCode1] AS Address. I
tried using UCase[StateOrProvince1] but that didnt' work...

Thanks for your help!

fredg said:
Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

The > in the Format property merely displays the data in upper case,
but it is still stored however it was entered.

You can (on the report) use an unbound text control:
=Ucase([State])

A better solution is to have a table of State names and use it as the
rowsource of a Combo Box on your form to select the state. There are
only 50 states, so properly capitalizing each state name once is all
you would need do.
In an Update query:

Update StateTable Set StateTable.StateName = UCase([StateName])

Now you avoid your original problem entirely. Whenever you select the
state in the combo box, it's already in upper case.
I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!

=Format([SchedDate],"dddd, mmmm d, yyyy") & " at " &
Format([ShiftStart],"h:nn AM/PM")

Regarding: I tried using UCase[StateOrProvince1] but that didnt'
work...
Is that a typo error -- UCase[StateOrProvince1] -- or did you
actually leave off the parenthesis in your code?

[City1] & ", " & UCase([StateOrProvince1]) & " " & [PostalCode1] AS
Address
 
F

fredg

Fred,
Thanks for the reply. The date/time formatting was perfect!

As for the State in CAPS issue- I do like the idea of having a State table,
except we have international members as well. So a Canadian address City,
State, Zip and Country might be:
OTTAWA ON K1A 0B1
CANANDA

And I admit, sometimes ON is spelled out in the db as Ontario.
Then there is an entry for: Ostroda 14-100 POLAND where Ostroda is the
State.

So, I'm not sure what the standard should be for a City, State, Zip and
Country field. I'd appreciate suggestions. I can certainly update the db to
Uppercase (since you showed me how!).

In my query, I'm using:
[City1] & ", " & [StateOrProvince1] & " " & [PostalCode1] AS Address. I
tried using UCase[StateOrProvince1] but that didnt' work...

Thanks for your help!

fredg said:
On Thu, 19 Jul 2007 07:40:05 -0700, Stephanie wrote:

Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

The > in the Format property merely displays the data in upper case,
but it is still stored however it was entered.

You can (on the report) use an unbound text control:
=Ucase([State])

A better solution is to have a table of State names and use it as the
rowsource of a Combo Box on your form to select the state. There are
only 50 states, so properly capitalizing each state name once is all
you would need do.
In an Update query:

Update StateTable Set StateTable.StateName = UCase([StateName])

Now you avoid your original problem entirely. Whenever you select the
state in the combo box, it's already in upper case.


I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!

=Format([SchedDate],"dddd, mmmm d, yyyy") & " at " &
Format([ShiftStart],"h:nn AM/PM")

Regarding: I tried using UCase[StateOrProvince1] but that didnt'
work...
Is that a typo error -- UCase[StateOrProvince1] -- or did you
actually leave off the parenthesis in your code?

[City1] & ", " & UCase([StateOrProvince1]) & " " & [PostalCode1] AS
Address

I meant to add to my previous post...
Using a table of already entered State names (all in upper case) would
prevent inadvertent misspellings. Take a look at your spelling of
"Cananda" above. :)
It's easy enough to add additional names when needed.
 
S

Stephanie

Fred,
Just a question about UCase.

In a query where the FROM clause has only one table, I refer to
UCase([StateOrProvince1])
which works well.

In a query where there is a join, the field is now Contacts.StateOrProvince1
and I was unable to force UCase. I must be missing something in the
formatting. Do you have any suggestions? Thanks.

fredg said:
Fred,
Thanks for the reply. The date/time formatting was perfect!

As for the State in CAPS issue- I do like the idea of having a State table,
except we have international members as well. So a Canadian address City,
State, Zip and Country might be:
OTTAWA ON K1A 0B1
CANANDA

And I admit, sometimes ON is spelled out in the db as Ontario.
Then there is an entry for: Ostroda 14-100 POLAND where Ostroda is the
State.

So, I'm not sure what the standard should be for a City, State, Zip and
Country field. I'd appreciate suggestions. I can certainly update the db to
Uppercase (since you showed me how!).

In my query, I'm using:
[City1] & ", " & [StateOrProvince1] & " " & [PostalCode1] AS Address. I
tried using UCase[StateOrProvince1] but that didnt' work...

Thanks for your help!

:

On Thu, 19 Jul 2007 07:40:05 -0700, Stephanie wrote:

Hello! I'm hoping the discussion group can advise me on a couple of
formatting issues-

I have a State field that is 2 characters with a format of " >". Great for
data entry, but when the State in pulled into a report, the State does not
appear in all capital letters. What is the correct formatting for all caps?

The > in the Format property merely displays the data in upper case,
but it is still stored however it was entered.

You can (on the report) use an unbound text control:
=Ucase([State])

A better solution is to have a table of State names and use it as the
rowsource of a Combo Box on your form to select the state. There are
only 50 states, so properly capitalizing each state name once is all
you would need do.
In an Update query:

Update StateTable Set StateTable.StateName = UCase([StateName])

Now you avoid your original problem entirely. Whenever you select the
state in the combo box, it's already in upper case.


I have a Date/Time field with this formatting:
=(Format$([SchedDate],"Long Date",0,0) & " at " &
(Format$([ShiftStart],"Medium Time")))

which gives me: Sunday, July 08, 2007 at 09:30 AM
How can I format for: Sunday, July 8, 2007 at 9:30 AM, removing the leading
zeros?

Thanks for your assistance!

=Format([SchedDate],"dddd, mmmm d, yyyy") & " at " &
Format([ShiftStart],"h:nn AM/PM")

Regarding: I tried using UCase[StateOrProvince1] but that didnt'
work...
Is that a typo error -- UCase[StateOrProvince1] -- or did you
actually leave off the parenthesis in your code?

[City1] & ", " & UCase([StateOrProvince1]) & " " & [PostalCode1] AS
Address

I meant to add to my previous post...
Using a table of already entered State names (all in upper case) would
prevent inadvertent misspellings. Take a look at your spelling of
"Cananda" above. :)
It's easy enough to add additional names when needed.
 

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