Entering and Viewing dates in a form

G

Guest

Hi there,

I am building a form where I use a short date input mask in a date field in
my table. After the date is entered, I can see the date reflected as I would
like it as "08/18/07".

However, when I go to someone elses computer and use my form who has their
global settings set up to show a short date as "mm/dd/yyyy", the format
changes.

The data entry is still "mm/dd/yy" as that's what the input mask requires.
But it is displayed differently after the user leaves the text box.

Is there any way to override the users global settings and display the date
on the form as "mm/dd/yy" and still allow them to edit the date as well?

Thanks for your assistance!!
 
G

Guest

Neither Input Masks nor Formats have any effect on how the value is stored.
An Input Mask is useful only to impose data entry requirements. Most
professional developers, including me, don't use input masks. The come with
some stinky baggage. Formats are very useful for displaying data. If you
use a format on your date controls on your form, you will always see them as
you want them.
An Input mask has no effect on how a value is displayed.
A Format has no effect on how the value is entered in the control.
 
G

Guest

Thank you very much for your response!

I understand what you mean about the input masks as they can be somewhat of
a pain.

One other question about the formatting: Is it possible to have custom
formatting of your control while having it as a data input field at the same
time?

Thanks again!!
 
G

Guest

Sure. Use the Format property in the Properties dialog to define the format.
Again, it has no effect on how the data is entered or stored. It only
defines how it is displayed.
 
G

Guest

For some reason, I thought the format property in the Properties dialog was
limited to the items listed in the drop down box. So if I selected Short
Date, then the date would be displayed in the format which the user has set
in their regional settings.

I didn't know it was as simple as entering in mm/dd/yy in the format
property to customize how you want to display the date.

My apologies. Sometimes the answer is so simple but you still need a
guiding hand to find it.

Thanks again Dave! I also wanted to thank you and everyone else who helps
out in this news group. There is so much valuable information here and
everyone is very willing to share what they know whenever they can. Cheers
to you all!

Kind Regards,
TT
 

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