|
-
Aug 8th, 2000, 02:59 PM
#1
Thread Starter
Hyperactive Member
I have two listboxes - Start Date & End Date, I want to populate these listboxes with dates ranging from today(system date) up to today, next year ie all dates from 08/08/2000 thru 08/08/2001.
Must I just get the system date and in a loop add 1 to the day, check month, check year and add each loop to the listboxes or is there an easier way!!??
-
Aug 8th, 2000, 03:10 PM
#2
Frenzied Member
1) Use a datepicker control instead of the list box
2) dtpStart.value= date will set the first one to the current date.
3) dtpEnd.value = DateAdd("y", 1, Date) will set the end value.
You'll just need to make sure, in code that they dont select beyond the two dates...
-
Aug 8th, 2000, 04:31 PM
#3
Thread Starter
Hyperactive Member
First time I've used the datepicker - VERY NICE!!!
The only problem I'm having now is binding the datepicker to my table... here's my code..
Set DTPickerStart.DataSource = rsRecord
DTPickerStart.DataField = "start_date"
It's a MS ACCESS database and start_date is set to Date/Time. This worked fine when I was using the listbox. I also set start_date to text in the database, but I still get the error....
"runtime 545 - Unable to bind to field or datamember: start_date"
Must one do something "special" when binding the datepicker!!??
-
Aug 8th, 2000, 04:45 PM
#4
Frenzied Member
If you have to bind the control, set it on the control itself (click on databindings).
-
Aug 8th, 2000, 05:00 PM
#5
Thread Starter
Hyperactive Member
No luck - still get the same error!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|