DatePicker Control

Posted on 2002-04-29
Last Modified: 2008-03-03
Hi All,
How do i use a Date Picker control and an updowncontrol together.
Can anyone explain by a simple coding.
Thanks in advance.
Question by:shanth_77
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6979441
If you want I will send you a project.

give me your email id.
LVL 16

Expert Comment

ID: 6979455
AN entire project by mail instead to show an example here?
LVL 52

Expert Comment

by:Ryan Chong
ID: 6979475
Do a research on MSDN Online ?

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.


Accepted Solution

n_narayanan earned 50 total points
ID: 6979531
Try this,

Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   2610
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5490
   LinkTopic       =   "Form1"
   ScaleHeight     =   2610
   ScaleWidth      =   5490
   StartUpPosition =   3  'Windows Default
   Begin MSComCtl2.UpDown UpDown1
      Height          =   330
      Left            =   3510
      TabIndex        =   2
      Top             =   1260
      Width           =   240
      _ExtentX        =   423
      _ExtentY        =   582
      _Version        =   393216
      Enabled         =   -1  'True
   Begin VB.TextBox Text1
      Height          =   285
      Left            =   2100
      TabIndex        =   0
      Top             =   1290
      Width           =   1080
   Begin MSComCtl2.DTPicker DTPicker1
      Height          =   315
      Left            =   1845
      TabIndex        =   1
      Top             =   1275
      Width           =   1605
      _ExtentX        =   2831
      _ExtentY        =   556
      _Version        =   393216
      CheckBox        =   -1  'True
      Format          =   69730305
      CurrentDate     =   37376
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub DTPicker1_Change()
If Not IsNull(DTPicker1.Value) Then
    Text1.Visible = False
    Text1.Visible = True
End If

End Sub

Private Sub Form_Load()
DTPicker1.Value = Null
Text1.Locked = True
End Sub

Private Sub UpDown1_DownClick()
DTPicker1.Value = DTPicker1.Value - 1
End Sub

Private Sub UpDown1_UpClick()
DTPicker1.Value = DTPicker1.Value + 1
End Sub


Expert Comment

ID: 6979536
Open a Notepad and copy the above code then save it as form1.frm

And In your Project add the components,

Microsoft Windows Common Control-2 6.0 (SP3)

LVL 43

Expert Comment

ID: 6979940
Why not just set the .UpDown property of the dtpicker to True and keep it simple. Why use two controls when one of them already has the required functionality?
LVL 49

Expert Comment

ID: 7698665
Hi shanth_77,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept n_narayanan's comment(s) as an answer.
    *** TimCottee may have actually solved it, but barring new info, I think n_narayanan answerd the stated question.

shanth_77, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 7755522
per recommendation

Community Support Moderator @Experts Exchange

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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 ( 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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…

690 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