Ask Your Question
3

How can I establish a particular date format using VBA in MS Access?

asked 2023-06-22 21:00:21 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-22 21:26:02 +0000

nofretete gravatar image

You can establish a particular date format in MS Access using VBA by setting the Format property of the desired control to the desired date format string. For example, if you want to display dates in the format "dd/mm/yyyy", you can use the following code:

Forms("MyForm").Controls("MyDateControl").Format = "dd/mm/yyyy"

Alternatively, you can also set the default date format for the entire database by going to File > Options > Object Designers, and entering the desired format string in the Default date format field. This will apply to all date controls in the database, unless their Format property is explicitly set to a different value.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-22 21:00:21 +0000

Seen: 10 times

Last updated: Jun 22 '23