Solved

DatePicker Control

Posted on 2002-04-29
8
219 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
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 49

Expert Comment

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

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

Cheers
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 50 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

708 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

19 Experts available now in Live!

Get 1:1 Help Now