Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

binding DatetimePicker control

Posted on 2001-06-16
10
Medium Priority
?
540 Views
Last Modified: 2013-11-25
I have a form where I try to bind a DTpicker control to a recordset field using datafield and datasource properties.
When user edit the date, an error appears stating:

Databinding collection error - field not updatable

Note that changes are registered in the field.
If I use a textbox with the same datafield and datasource properties, I have no error.
How to avoid the databinding error ?
0
Comment
Question by:paolodp
[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
  • 3
  • 2
  • +1
10 Comments
 

Author Comment

by:paolodp
ID: 6199383
PS I'm using ado 2.1 with vb6 SP3
0
 
LVL 7

Expert Comment

by:q2eddie
ID: 6199556
Hi, paolodp.

#Questions
1. Are you setting the data properties at run-time (thru code)?
2. Is this the exact wording of the error message?

#Links
1. "HOWTO: Change Databindings on the Fly"
http://support.microsoft.com/support/kb/articles/q189/8/52.asp

2. "BUG: Error Message Received When You Use the DTPicker to Update Table"
http://support.microsoft.com/support/kb/articles/q288/7/72.ASP

Bye. -e2
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6200198
Do you have problems with other fields?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:paolodp
ID: 6208977
1. Yes, I set datamember and datasource properties at run-time.

2. the exact wording of the error message is:

Binding Collection Error (msgbox title)

Field not updatable, Bound property name:Value, Field name:FirstDate


(FirstDate is a field in the open table)

Error raises on lostfocus event or, if using calendar popup window, when calendar window closes (clicking a date).
 
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6208994
I sometimes have this problem with combos. To fix it, I use an invisible label which is bound (the combo isn't). In the change event of the label, I set the combo and in the change event of the combo, I set the label. I'm sure that this will work for you.
0
 

Author Comment

by:paolodp
ID: 6209060
Thank you for your tip, emoreau
I've already used this method; I could use also a textbox with a validation function, but before resignating to do one of these, I'd like to succeed to use the control as it should be used. MSKB does not mention this problem, I suppose not to be the first using a DatetimePicker bound control and I'd like to understand how and why.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6220695
Seems that no other workaround are available!!!
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 400 total points
ID: 6263110
Seems that no other workaround are available!!!
0
 
LVL 7

Expert Comment

by:q2eddie
ID: 6263136
Hey, paolodp.

#Questions
1. Are you using a datetime-type field for your dtpicker?

#Comments
Recently, I read somewhere that the first datetime-type field in a database is often interpreted as a timestamp field.  Add a second datetime-type field and see what happens.

Bye. -e2
0
 

Expert Comment

by:costello
ID: 6400336
Force accepting proposed answer by emoreau.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Independent Software Vendors: 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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

688 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