Dtpicker problem, any ideas why I can't set my dtpicker control to now()

  • Thread starter Thread starter Patrick Gibbons
  • Start date Start date
P

Patrick Gibbons

Private Sub Form_Open(Cancel As Integer)

ResetDataEntryForm

End Sub


function ResetDataEntryForm() as long

cboSite = ""
cboLocation = ""
txtName = ""
dtIntialEntry.Value = Now()
....
end function


It goes through the comboboxes and the textbox fine, but when it gets to my
dtpicker it just pops back up to my calling subprocedure.

Any ideas?
 
The DTP defaults to Format = 1, Shortdate, with its date already set to Now.
If you want it to show a time, change the Format to 2.

Also, you're using a Function defined as Long which returns nothing.
Consider changing it to a Sub.
 
Thank you, someone else (in another forum) noted that the load event is the
wrong place and placing it in the current seems to work better.

As for the function returning nothing it will, an long err.number . . . if
applicable . . .

Just not finished. Don't want to error check myself out of figuring out
what went wrong, no?
 
Back
Top