Solved

DTPicker set to today's date

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

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 51

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 50 total points
ID: 10811035
Maybe DTPicker1.Value = Now
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

685 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