What sort of thing would I need to put in the validate event of a textbox to make sure that only a date between two certain dates could be added? Thanks.
Printable View
What sort of thing would I need to put in the validate event of a textbox to make sure that only a date between two certain dates could be added? Thanks.
On the lost focus event..
If trim(txtdate.text) <> "" then
if isdate(txtdate.text) then
if cdate(txtdate.text) >= cdate("01/01/2001") and cdate <= cdate("01/01/2001") then
esle
'send error message
txtdate.setfocus
endif
endif
change the dates to suit your needs
Thanks, just what I needed.