Solved

DTPicker set to today's date

Posted on 2004-04-12
3
1,904 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 49

Expert Comment

by:Ryan Chong
Comment Utility
Try set the DTPicker's Value Property.

Example:

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

cheers
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
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 50 total points
Comment Utility
Maybe DTPicker1.Value = Now
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now