Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTPicter

Status
Not open for further replies.

technohead

Technical User
Jan 12, 2002
64
0
0
US
Hi,
i just want to set the date picker to todays date when it goes to the form. this has worked for me already using

frmName.DTpicker.value = date

however on one of the forms i have the dtpicker set as a control array. i am using tabs on this form and each tab has a dtpicker

the code i am using is put behond the command button. wheni click on a command button it will bring me to the form with todays date highlighted.
the only options given to me when i try the above are count item lbound and ubound.

could u please tell me if this is the wring way, or what could i do to set the dtpicker to todays date.

thank you
 
When you have a control array, the only properties available when you type "object." will be the ones you listed because vb expects you to tell it which control in the array you are talking about.

Try typing this and see what properties become available:
frmName.DTpicker(0).

In the line above I would be referencing the first control in the 0-based array of dtpicker controls.


Hope this helps!
Josh
 
Hi it works for the first control in the array by puttting in the following

frmname.dtpicker(index).value = date

i thought this should work for them all but it does'nt.

anyone any ideas!!!
 
Code:
dim i as long
dim lb as long
dim ub as long

lb=frmname.dtpicker.lbound
ub=frmname.dtpicker.ubound

for i = lb to ub
  frmname.dtpicker(i).value = date
next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top