Change time

A

AHopper

Is there a way to change the standard time entered through
a text box to military time?

Example
11 PM to 23

I would like to us the After Update event of
the "PackTime" text box and have the changed time show in
a second text box "PackMTime".

Thanks for your help

Allan
 
G

Graham Mandeno

Hello Allan

The data isn't changing here - only the way it's being displayed - ie the
Format property.

Set the ControlSource of your second textbox to =[PackTime] and its Format
to hh (or hh:nn if you want the minutes as well). No AfterUpdate event
required!
 
J

Jonathan Parminter

-----Original Message-----
Is there a way to change the standard time entered through
a text box to military time?

Example
11 PM to 23

I would like to us the After Update event of
the "PackTime" text box and have the changed time show in
a second text box "PackMTime".

Thanks for your help

Allan
Hi Allan, no need to use the AfterUpdate event. Have the
second textbox set to the same field as control source.
Then set the format property of this second textbox to
short time.

Luck
Jonathan
 
J

John Vinson

Is there a way to change the standard time entered through
a text box to military time?

Example
11 PM to 23

I would like to us the After Update event of
the "PackTime" text box and have the changed time show in
a second text box "PackMTime".

A Date/Time field is stored internally as a Double Float number; the
format can vary widely. I'd suggest using just one textbox; set its
Format property to "hh:nn". This will allow you to enter 23:00 or
11:00 PM, but will display the stored time as 23:00.
 
A

AHopper

Thank you Graham.
Allan
-----Original Message-----
Hello Allan

The data isn't changing here - only the way it's being displayed - ie the
Format property.

Set the ControlSource of your second textbox to = [PackTime] and its Format
to hh (or hh:nn if you want the minutes as well). No AfterUpdate event
required!

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Is there a way to change the standard time entered through
a text box to military time?

Example
11 PM to 23

I would like to us the After Update event of
the "PackTime" text box and have the changed time show in
a second text box "PackMTime".

Thanks for your help

Allan


.
 
A

AHopper

Thank you Jonathan
Allan
-----Original Message-----

Hi Allan, no need to use the AfterUpdate event. Have the
second textbox set to the same field as control source.
Then set the format property of this second textbox to
short time.

Luck
Jonathan
.
 

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