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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime Picker in Access Forms

Status
Not open for further replies.

Xenobia

MIS
Feb 27, 2002
12
0
0
GB
I'm trying to use the MS datetime picker control to make date selection easy for users (for setting appointments).

The control works fine in the sense that I've placed two controls on the form bound each to the date/time field and each updates just fine.

However on re-entering the form the controls display the default date and time not the date and time from the date/time field in the record.

I've tried setting the value of the control using vba

(ie. me.datetimecontrol.value = me.datetime - where datetime is a hidden textbox bound to the same field) but with no success whatsoever)

Any ideas how I get these controls to display the date/time from the record rather than the default?
 
How about me.dateTime.Value

Worth mentioning...I have noticed in using VB code that once in a while things work better if I store values in a variable and then access the variable.

Dim myVariable As Variant

myVariable = me.dateTime
(or myVariable = me.dateTime.Value)
me.dateTimeControl.Value = myVariable

MrMajik

Everything should be made as simple as possible, but not simpler
--Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top