Date Picker Default Question (1 Viewer)

wilderfan

Registered User.
Local time
Today, 06:42
Joined
Mar 3, 2008
Messages
172
I'm using a form to populate a table called tblPhotoAlbums.

Fields are:
PKid
Photographer (id from another table)
Volume
Date

On the form, I'm using Date Picker, but I hate having to backtrack several years (even decades).

I'd like the Date Picker to default to a particular year and month - depending on what the user inputs for Photographer and Volume.

I was thinking I could use the On Enter event for the Date text box.

eg,

If cboPhotographer = 1 and cboVolume = 1 Then
txtDate.defaultvalue = #10/1/1962#
End If

But the above doesn't work. Not sure why. I still get the Date Picker opening to May 2013.

Any suggestions ?
 

spikepl

Eledittingent Beliped
Local time
Today, 14:42
Joined
Nov 3, 2010
Messages
6,144
Default values are applied only to newly minted virgin records. Your isn't at the time when you get to your txtDate. To set a value depnding on other values, and yet let users overwrite it, you can do this:

1. Make a subroutine that sets the value of txtDate, covering all the combinations of the two combos
2. In the AfterUpdate event of each combo, call that subroutine.
 

Users who are viewing this thread

Top Bottom