[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

Date and Time Picker on Continuous Forms

I am using the date and time picker throughout my program and it works fine everywhere except on my continuous forms.   I have the form's recordsource set to a query that gets the date from the date and time picker. The form and code works fine as long as the query finds matching records.  If no matching records are found, and I attempt to change the date, I receive the following message.

Run -time error '2771':
The bound or unbound object frame you tried to edit doesn't contain an OLE object

Then it stops working altogether. I can get the form working with a textbox formatted to shortdate and have the user type it in, but since I'm using the control everywhere else, I'd really like to get it working on this form as well. I've searched the ee knowledgebase and saw others with this problem, but the solutions are not working for me. I'd really appreciate any help anyone could give. Thanks!
4 Solutions
I used to use the date & time picker & found too many problems with it ,like the one your having.
Check out http://www.lebans.com/monthcalendar.htm ,it uses the date & time picker dll & so far I haven't found any bugs.

Good Luck!

Jeffrey CoachmanCommented:

I case you do not get the answer you need, check out this link:


It is a Non-Active-x Date picker that you can make yourself. It is a lot smaller than the one that comes with Access.

Follow the steps on the page to create it, or just download the sample database!

Good luck!
You cannot use an activex control (Date and Time Picker is an ActiveX control) in a Continuous Forms, Access will not allow you to.
an option will be to have this activex control on the Form Header and a command button OR textbox pointing to it in the Continuous Forms, to take the data from it.

Jim P.Commented:
I ran into this a while back.

Create two regular unbound text boxes set to be a date/time format. Set the visible = false.
When the user populates from the control have them populate the text boxes. Then run your query against the values in the text boxes.
MavisleeAuthor Commented:
I just want to thank everyone for taking the time to reply to my question. I tried both JJafferr and Jimpen's solutions and even went as far as putting the calendar on a separate pop-up, transferring the date to a text box on the continuous form, and having the query get the date from the textbox, but it still didn't work. I don't understand what the problem is, but it's just not working. I wound up using a regular textbox formatted to medium date, which works fine. Although, I don't have the time to implement Boag2000 and tbsgadi's solutions on this project, I appreciate these links as they both seem to be viable solutions for future projects. I won't bother with this control anymore. Thanks again for all your help and ideas!

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now