Hi. I have a date time picker in my program which uses ADO to read from an
Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the date time
picker returns error 545. Any attempts to progmatically add new records
after the empty database has been opened returns, or to use the DTP and set
a new date for those added records, "Field not updateable, Bound Property
Name: Value, Field Name: Date Planted"
Any ideas?
Set dtpDate.DataSou rce = adoRecordSet
dtpDate.DataFie ld = "Date Planted"
<Ade
--
Adrian Parker. Ordained priest. <ad***********@ sympatico.ca>
Want to know the purpose of life? I'd be happy to share it with you... 5 7093
That Date-Time Picker is being a little bit funky.
If you go to the Date-Time Picker, and set its Checkbox property to true, that
will allow the bound field to be null. This is what is happening with no
records, or with new records. Otherwise, it is trying to get a date out of a
field that is null, which generates the errors you are seeing.
The user then has to check the box to "activate" the date picker. It ain't the
prettiest thing I've ever seen, but it should work correctly.
"Adrian Parker" <no@addy.com> wrote in message
news:Fc******** ***********@new s20.bellglobal. com... Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the date time picker returns error 545. Any attempts to progmatically add new records after the empty database has been opened returns, or to use the DTP and set a new date for those added records, "Field not updateable, Bound Property Name: Value, Field Name: Date Planted"
Any ideas?
Set dtpDate.DataSou rce = adoRecordSet dtpDate.DataFie ld = "Date Planted" <Ade -- Adrian Parker. Ordained priest. <ad***********@ sympatico.ca> Want to know the purpose of life? I'd be happy to share it with you...
why not
1) check the recordset (on that table or query) and if empty ............
report that fact back to the user
or if there are records
2) check for a NULL in that field and if so............. . report that fact
back to the user
Fud
"Steve Gerrard" <no************ *@comcast.net> wrote in message
news:kP******** ************@co mcast.com... That Date-Time Picker is being a little bit funky.
If you go to the Date-Time Picker, and set its Checkbox property to true,
that will allow the bound field to be null. This is what is happening with no records, or with new records. Otherwise, it is trying to get a date out of
a field that is null, which generates the errors you are seeing.
The user then has to check the box to "activate" the date picker. It ain't
the prettiest thing I've ever seen, but it should work correctly.
"Adrian Parker" <no@addy.com> wrote in message news:Fc******** ***********@new s20.bellglobal. com... Hi. I have a date time picker in my program which uses ADO to read from
an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the date
time picker returns error 545. Any attempts to progmatically add new records after the empty database has been opened returns, or to use the DTP and
set a new date for those added records, "Field not updateable, Bound
Property Name: Value, Field Name: Date Planted"
Any ideas?
Set dtpDate.DataSou rce = adoRecordSet dtpDate.DataFie ld = "Date Planted" <Ade -- Adrian Parker. Ordained priest. <ad***********@ sympatico.ca> Want to know the purpose of life? I'd be happy to share it with you...
"Fuddzy" <ch******@acces scomm.ca> wrote in message
news:3f******@n ews3.accesscomm .ca... why not 1) check the recordset (on that table or query) and if empty ............ report that fact back to the user or if there are records 2) check for a NULL in that field and if so............. . report that fact back to the user
In this case the user should be allowed to delete all records, close the
database, and if he wants reopen at a later time and using my program add
more entries.
I think the teacher will doc me marks if I don't allow the database to open
if it's empty.
Adrian
"Steve Gerrard" <no************ *@comcast.net> wrote in message news:kP******** ************@co mcast.com... That Date-Time Picker is being a little bit funky.
If you go to the Date-Time Picker, and set its Checkbox property to
true, that will allow the bound field to be null. This is what is happening with no records, or with new records. Otherwise, it is trying to get a date out
of a field that is null, which generates the errors you are seeing.
The user then has to check the box to "activate" the date picker. It
ain't the prettiest thing I've ever seen, but it should work correctly.
"Adrian Parker" <no@addy.com> wrote in message news:Fc******** ***********@new s20.bellglobal. com... Hi. I have a date time picker in my program which uses ADO to read
from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the
date time picker returns error 545. Any attempts to progmatically add new
records after the empty database has been opened returns, or to use the DTP
and set a new date for those added records, "Field not updateable, Bound Property Name: Value, Field Name: Date Planted"
Any ideas?
Set dtpDate.DataSou rce = adoRecordSet dtpDate.DataFie ld = "Date Planted" <Ade -- Adrian Parker. Ordained priest. <ad***********@ sympatico.ca> Want to know the purpose of life? I'd be happy to share it with
you...
"Steve Gerrard" <no************ *@comcast.net> wrote in message
news:kP******** ************@co mcast.com... That Date-Time Picker is being a little bit funky.
If you go to the Date-Time Picker, and set its Checkbox property to true,
that will allow the bound field to be null. This is what is happening with no records, or with new records. Otherwise, it is trying to get a date out of
a field that is null, which generates the errors you are seeing.
The user then has to check the box to "activate" the date picker. It ain't
the prettiest thing I've ever seen, but it should work correctly.
Yes, I quite like this fix. It may not be perfect, but it does the job
well. Besides I can always progmatically check whether it's Null, and set
the CheckBox value progmatically. "Adrian Parker" <no@addy.com> wrote in message news:Fc******** ***********@new s20.bellglobal. com... Hi. I have a date time picker in my program which uses ADO to read from
an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the date
time picker returns error 545. Any attempts to progmatically add new records after the empty database has been opened returns, or to use the DTP and
set a new date for those added records, "Field not updateable, Bound
Property Name: Value, Field Name: Date Planted"
Set dtpDate.DataSou rce = adoRecordSet dtpDate.DataFie ld = "Date Planted"
of course YOU would not give control to the user........... .......... all i
suggested was the logic required to HANDLE your situation ..the rest is up
to u............go od luck........... .......
fud
"Adrian Parker" <no@addy.com> wrote in message
news:gT******** ************@ne ws20.bellglobal .com... "Fuddzy" <ch******@acces scomm.ca> wrote in message news:3f******@n ews3.accesscomm .ca... why not 1) check the recordset (on that table or query) and if empty
............. report that fact back to the user or if there are records 2) check for a NULL in that field and if so............. . report that
fact back to the user In this case the user should be allowed to delete all records, close the database, and if he wants reopen at a later time and using my program add more entries.
I think the teacher will doc me marks if I don't allow the database to
open if it's empty.
Adrian "Steve Gerrard" <no************ *@comcast.net> wrote in message news:kP******** ************@co mcast.com... That Date-Time Picker is being a little bit funky.
If you go to the Date-Time Picker, and set its Checkbox property to true, that will allow the bound field to be null. This is what is happening with
no records, or with new records. Otherwise, it is trying to get a date
out of a field that is null, which generates the errors you are seeing.
The user then has to check the box to "activate" the date picker. It ain't the prettiest thing I've ever seen, but it should work correctly.
"Adrian Parker" <no@addy.com> wrote in message news:Fc******** ***********@new s20.bellglobal. com... > Hi. I have a date time picker in my program which uses ADO to read from an > Access database. It works perfectly, unless the database is empty
(no > records) when opened. When you try to open an empty database, the date time > picker returns error 545. Any attempts to progmatically add new records > after the empty database has been opened returns, or to use the DTP and set > a new date for those added records, "Field not updateable, Bound Property > Name: Value, Field Name: Date Planted" > > Any ideas? > > > Set dtpDate.DataSou rce = adoRecordSet > dtpDate.DataFie ld = "Date Planted" > > > > <Ade > -- > Adrian Parker. Ordained priest. <ad***********@ sympatico.ca> > Want to know the purpose of life? I'd be happy to share it with you... > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TD |
last post by:
This code doesn't work. Every posting I can find suggests that it
should.
If TypeOf controlname Is DTPicker then
do something here
End If
I am using the Date Time Picker control and wish to use TypeOf to
determine if the controlname is indeed a Date Time Picker control.
|
by: XmlAdoNewbie |
last post by:
Hi All,
I am wondering if it is possible to allow nulls or empty strings when
it comes to the datetimepicker control. I have an app with a few
datetimepickers on it and there are some instances when i don't want a
date to show at all but the datetimepickers always have at least
todays date in it so when i go to press the save button on my app
there is always a date stored in the retrieved field. Is there a way
to say "hey i don't want a...
|
by: John Smith |
last post by:
Hello all:
I am having some difficulty trying to bind some Date Time Picker
controls to a database that may have Null values in some of these
fields. I continue to get the following error:
"Object cannot be cast from DBNull to other types."
I have tried to manually set the values to a valid date but to no avail.
|
by: Need Helps |
last post by:
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the graphical interface, and then used the graphical interface to add a Date Time Picker control to it. The only problem is, I don't know how to do anything with the Date Time Picker, like access the date selected within the control. All I have is the ID, which in my code is IDC_DATETIMEPICKER1. ...
|
by: Rethish |
last post by:
Hi All,
I am developing an application in VB.net. I am using .Net Datetime
picker control to manage the date. But I am not able to assign null/Empty
value to the control. I found the property "Checked" to work with this
control..But I cannot use this property for making null dates..
Is there any way to solve this problem?.
Expecting any help or suggestions?
Regards,
| |
by: Michael Turner |
last post by:
Hi Guys
I have two DateTime pickers one shows the Date and the other the time, this
is a requirement of the solution. The problem I have is that when the time
is saved to the sql database into a datetime field it uses the default date
which is a problem when I try to sort, what I wanted to know is there a way
for me to set the date in the time picker to the date in the date picker?
Any help greatly appreciated.
|
by: Darhl Thomason |
last post by:
I'm converting my Access 2003 VBA app. I have a number of date fields in my
db that I want to use the date/time picker control with, but if there is no
entry in my database, I want the date/time picker to show no date. Right
now the first time it shows a blank date record, it inserts today's date.
But as I move through the db and it finds a date in that field, the next
time it finds a blank data record, it uses the last one as the...
|
by: Michel Posseth [MCP] |
last post by:
I have a problem with the date time picker validate event wich i believe is
a bug
How to reproduce :
throw on a form a date time picker control and a textbox control
select the validating event of the control and add this code
|
by: fredloh |
last post by:
i have a tab control on my form. i then have several microsoft date
and time picker control on the tab control. when i select a date on
any of the date and time picker control, the result of the control's
value is always 12:00:00 am instead of the date i selected even though
the date displays correctly on the date and time picker control. the
controls are unbound.
why is this?
i also have another identical form where the date and...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |