Hello,
I've got a problem using the calendar tool in a form with empty recordset.
The maintable of the database consists of daterelated records. These data
are used in the form 'frmmain' via a query with a wherecondition that gets
it's input from the unbound textfield "txtdate"
(=[forms]![frmmain]![txtdate]). For the input of this txtfield, I would like
to use the calendar picker (microsoft calendar 10), a button 'calendar'
makes it visible, after clicking it becomes invisible again. When clicking
the button 'calendar', the value of the calendartool is set to
me.txtdate.value, and after selecting a date in the calendartool, this date
is inserted in me.txtdate.value. The code looks roughly like this,...
sub butcalendar.onclick()
me.mycalendartool.visible=true
me.mycalendartool.value=me.txtdate.value
end sub
sub mycalendartool.onclick()
me.txtdate.value= me.mycalendartool.value
me.mycalendartool.visible=false
end sub
Now this works fine, ... except when the filtered recordsource is empty. No
errors are given for the subroutines, but the txtdate-value is never used
for the value of mycalendartool. Instead the defaultvalue is used, or if
other dates have been accessed before without problems, then this value is
taken. And when selecting a date, not the selected date is returned, but
that default value.
I have tried to put the calendartool in a seperate form, but no avail. Tried
to bound the calendartool to an unbound textbox, no good either (cann't read
out its value then).
Anyone an idea how to solve this?? Help greatly appreciated.
Bart Pannemans
?????? - 31 Mar 2005 01:44 GMT
> Hello,
>
[quoted text clipped - 31 lines]
>
> Bart Pannemans
Alex Dybenko - 31 Mar 2005 08:16 GMT
Hi,
you can try to make a popup calendar, like in a sample below:
http://www.pointltd.com/Downloads/Details.asp?dlID=32

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> Hello,
>
[quoted text clipped - 36 lines]
>
> Bart Pannemans