?
Solved

DatePicker Control

Posted on 2002-04-29
8
Medium Priority
?
242 Views
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.
0
Comment
Question by:shanth_77
[X]
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
8 Comments
 
LVL 3

Expert Comment

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

give me your email id.
0
 
LVL 16

Expert Comment

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

Expert Comment

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

http://msdn.microsoft.com/default.asp

Cheers
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Accepted Solution

by:
n_narayanan earned 200 total points
ID: 6979531
Try this,


VERSION 5.00
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
   End
   Begin VB.TextBox Text1
      Height          =   285
      Left            =   2100
      TabIndex        =   0
      Top             =   1290
      Width           =   1080
   End
   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
   End
End
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
Else
    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

Narayanan
0
 
LVL 3

Expert Comment

by:n_narayanan
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)


Narayanan
0
 
LVL 43

Expert Comment

by:TimCottee
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?
0
 
LVL 49

Expert Comment

by:DanRollins
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
0
 

Expert Comment

by:SpideyMod
ID: 7755522
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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