-
December 8th, 2005, 03:27 AM
#1
How to clear DTPicker
hi friends .
i have tow DTPicker in the form using them to search for date by date
so how to clear them when i want to make another search
to be
when Command1_Click()
DTPicker.value=" "
thanks
-
December 8th, 2005, 03:36 AM
#2
Re: How to clear DTPicker
-
December 8th, 2005, 05:15 AM
#3
Re: How to clear DTPicker
HI THERE
thanks i got it .
but when i want to say
if DTPicker1.value="" then
msgbox"*****"
else if DTPicker1.value<>"" then
msgbox"++++++"
just and example
actually i want to use to retrive date from databas in more than one choice.
-
December 8th, 2005, 05:32 AM
#4
Re: How to clear DTPicker
Sorry, I am not able to understand what is your requirement?
Can you explain a bit more.
-
December 8th, 2005, 05:55 AM
#5
Re: How to clear DTPicker
thanks
i use this code that u give it working ok
Private Sub DTPicker1_Change()
DTPicker1.Format = dtpCustom
DTPicker1.CustomFormat = "dd-MM-yyyy"
End Sub
now i want to display massage
when i say
IF DTPicker1="" then
msgbox " hi!!"
elseif DTPicker.value <>"" then
msgbox " hello"
the proplem here it show me only one massage in both when DTPicker<>""
and DTPicker.value=""
so what is the problem here
hope that u understand what i mean
thanks
-
December 8th, 2005, 06:25 AM
#6
Re: How to clear DTPicker
Originally Posted by hussein2000
thanks
i use this code that u give it working ok
Private Sub DTPicker1_Change()
DTPicker1.Format = dtpCustom
DTPicker1.CustomFormat = "dd-MM-yyyy"
End Sub
now i want to display massage
when i say
IF DTPicker1="" then
msgbox " hi!!"
elseif DTPicker.value <>"" then
msgbox " hello"
the proplem here it show me only one massage in both when DTPicker<>""
and DTPicker.value=""
so what is the problem here
hope that u understand what i mean
thanks
I struggeled for a long time with that. I used two different ways around it. In a simple case use the checkbox option in the datetimepicker. In a more complex case I had to place a text box on top of the dtpicker. Both controls are linked to the same field in the table.
Hope this help.
<jacom@dme.ae> or <jaco@emirates.net.ae>
-
December 8th, 2005, 06:35 AM
#7
Re: How to clear DTPicker
If I had to check the value of the DTPicker against null then I would use a Checkbox, like I have written in the link that I provided. You need to set the CheckBox property of the DTPicker to true. This will display a CheckBox in the DTPicker. If the checkbox is unchecked then that means the value in the DTPicker is null.
Code:
Private Sub Form_Load()
DTPicker1.CheckBox = True
End Sub
And someting like this to check thevalue
Code:
If IsNull(DTPicker1.Value) Then
MsgBox "Value in DTPicker is Null"
Else
MsgBox "Value in DTPicker is not null"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|