Unbound Control - Intermittant failure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 unbound controls on my form- which constitute a date range. I am
running about a dozen reports with the underlying queries using the two dates.

Everything works fine until I close the database and then open it again.
When I put in my date range in my unbound controls, and try to run the
queries/reports, they do not recognise the dates in the controls.

Any ideas?? All help gratefully appreciated
 
Fred,

Try explicitly setting the Format property of both textboxes to one of the
Date formats, then save the form.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Office DevCon 2007. Sydney, Australia 3rd-4th Nov. Will you be there?
http://www.block.net.au/devcon/index.htm
 
Graham,
Thanks for the reply, but I have already set the format of both text boxes
to Medium Date and I still have the problem. If I delete the unbound
controls, then replace them with new controls, format them and save them,
they work. When I close the form and re-open it, they work. When I close
the database and reopen it, they don't work. I am just a little perplexed.
 
Fred,

<<I am just a little perplexed.>>
Me too! I can't think why it would be happening.

Set the Visible property of each date textbox to False (and move them out of
the way). Then add two new textboxes (to visually 'replace' the one's you
just hid). Set the ControlSource property of each 'new' textbox so that it
equals the coerced value of its respective (hidden) date textbox, as
follows:
=CDate(txtDate1)

Does that work?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Office DevCon 2007. Sydney, Australia 3rd-4th Nov. Will you be there?
http://www.block.net.au/devcon/index.htm
 
Graham

I started to build a new form and began testing. I then went back to my
original form, and it is working fine. I know I did not change anything, I
am a quite meticulous so I would know what I did.

Thanks for all your pointers, I will let you know if things start to play up
again, but like yourself, I am really confused why this has occurred.
 
Back
Top