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

  • Thread starter Patrick Gibbons
  • 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?
 
N

Norm Cook

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.
 
P

Patrick Gibbons

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top