?
Solved

Can't set Value of DTPicker

Posted on 2005-04-03
4
Medium Priority
?
207 Views
Last Modified: 2013-12-26
I have tried setting the value of the DTpicker at runtime using the following statement in the Form_Load procedure:
           me.ctlDate.value = Now

I get the error message:  Runtime Error :'2763'  An error occurred in a call to the Windows Date and Time Picker Control

I have downloaded the latest version of the .ocx file and made sure it was registered correctly.  I have read all the other threads and most of them state that if you put the statement in the Load procedure and use the above syntax, it should work.  I don't understand why my control isn't working.

I am using this control on a switchboard and therefore do not want or have the ability to assign it's control source to a field in a table.  I thought about using a subform that has a date field that is defaulted to the current date and use it as the source but I have no way of linking the parent form to the subform.

Please help - I don't have time on this project to get hung up on this control!

Thanks!

I have since narrowed it down to having something to do with filtering the form at runtime.  When I comment out the code that filters the recordset and turn on filtering for the form, it works fine.  When I put it back - get the message again.
0
Comment
Question by:sgrice
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:sgrice
ID: 13693741
I have fixed the problem.  I tried just setting the record source at runtime and that didn't work until I changed the Record source property of the form to a SQL statement for the initial switchboard.  Something about the record source just being the underlying table then changing the recordset at runtime prompted the error message.  I'm clueless as to why but it's fixed now.  Hope this helps someone else.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14406274
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question