Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB6 Oracle
Private sub cmbrollno_click()
x = Format(DTPicker1.Value, "dd-mmm-yyyy")
        DTPicker1.Value = RES!DATE_OF_BIRTH
End sub
I wrote this code in combo - rollno click event.I do not loaded date_of_birth onto form_load event.I am using this code at various controls like: command1 - Inserting, command2 - Updating and combo rollno - displaying info of selected roll no.
I wanted to ask that is this code syntactically correct to be used in vb6? or code should be placed in other event or anything else?
 
While inserting and updating records it is giving error like: Invalid Use of Property.
Please help me.....
Posted 3-Jan-13 18:14pm
surkhi623
Edited 3-Jan-13 18:25pm
v2
Comments
Maciej Los at 13-Feb-13 13:28pm
   
I guess you are getting data from Oracle database into ADODB.Recordset. Probably, you do that on Form_Load() procedure. Am i right?
So.. You need to set value to DateTimePicker only in this event (Form_Load). Provide the biggest part of code, especially where data are loaded.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I am using following code in my project
 

May be following code will help
 
DTPicker1.Value = Date
DTPicker1.Format = dtpCustom
DTPicker1.CustomFormat = "dd/MM/yyyy"
 
and its working like charm
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 350
1 Sergey Alexandrovich Kryukov 320
2 BillWoodruff 309
3 George Jonsson 274
4 OriginalGriff 237
0 OriginalGriff 4,903
1 CPallini 3,960
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,786
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140905.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100