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 default. It
does not insert the date into the db, it just displays it. I really need it
to display a blank unless there is a date in that field.
I'm semi-experienced with VBA, but a total rookie with BO Express Edition.
Thanks!
Darhl 2 2420
Darhl Thomason wrote: 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 default. It does not insert the date into the db, it just displays it. I really need it to display a blank unless there is a date in that field.
I'm semi-experienced with VBA, but a total rookie with BO Express Edition.
Thanks!
Darhl
How are you attaching the data to the datetimepicker?
Chris
Darhl Thomason wrote: 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 default. It does not insert the date into the db, it just displays it. I really need it to display a blank unless there is a date in that field.
This is a common request as far as the DateTimePicker goes.
Unfortunately, it doesn't have a 'natural' way to display null data.
The closest built-in behavior is the ShowCheckBox property, which adds
a checkbox into the control, and disables the date picking part if the
checkbox is unchecked. It looks terrible (to my mind), but it's there.
--
Larry Lard
Replies to group please This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Adrian Parker |
last post by:
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...
|
by: Deano |
last post by:
Hi,
I generate a report using two dates (From and To). I notice if I enter
01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January
rather than 1st October as I intended.
This is the old problem of US date format mm/dd/yy versus dd/mm/yy.
I am stepping through the code and the dates do seem to be ok but when the
report runs I get records earlier than 1st October which is not what I want.
|
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: 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: 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: 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: luanhoxung |
last post by:
hi all !
i have a date & time picker control bound to 1 field. it worked fine.
But i always get the message :" Can't set value to Null when checkbox
properties = FALSE" when i open my form.
there isnot any checkbox or proceduce on my form.
if the D&T picker control is unbound to any field, no message appear.
Can anyone explain to me what is trouble ?
Thanks ur time visitting my post.
Luan from VietNam
|
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: Mark B |
last post by:
Is there one? I couldn't see it in the list of tools....
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |