Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DTPicker set to today's date

Posted on 2004-04-12
3
Medium Priority
?
1,943 Views
Last Modified: 2013-12-25
hi

I have a DTPicker and a refresh button. if i click it the DTPicker will set to today's date. how do i do that?
0
Comment
Question by:aquanok
  • 2
3 Comments
 
LVL 54

Expert Comment

by:Ryan Chong
ID: 10811021
Try set the DTPicker's Value Property.

Example:

Private Sub cmdRefresh_Click()
    DTPicker1.Value = Date
End Sub

cheers
0
 
LVL 54

Expert Comment

by:Ryan Chong
ID: 10811033
Just in case you want to display the date in the Format you want, you can always do this:

1. Right Click the DTPicker Control, click its Property
2. In the General Tab, under Format drop-down, select 3 - dtpCustome
3. Finally at the bottom CustomFormat textfield, enter the date format you want, example: dd/MM/yyyy

cheers
0
 
LVL 27

Accepted Solution

by:
Dabas earned 200 total points
ID: 10811035
Maybe DTPicker1.Value = Now
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question