473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

NULL dates show today's date rather than a blank or NULL on form

I am creating my first Visual Studio project, an inventory database. I have
created a form and used written directions to add data from a table to the
form using table adapters, data sets, etc.

I imported a table from an Access database which has some date fields. Many
of these dates have never been filled in, so are nulls. If I look directly
into the table data from Visual Studio it shows NULL.

However, when I scroll from record to record on the form, any date field
which should be NULL shows today's date, though it doesn't change it to that
date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of today? I
would rather show NULL or blank, e.g. one of the dates is a disposal date,
and the item is not disposed of yet.

How can I change the property on this field to show a blank or the word NULL
rather than today's date? Which property is this, and where? The form, the
table, the TableAdapter???

Thanks,
Mich
Nov 1 '06 #1
5 2671
The DateTimePicker control includes a ShowCheckBox property that lets you
turn date selection on and off with a checkbox. Try setting this field to
True. I haven't tried it with data binding, so I'm not fully sure it will
meet your needs.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
I am creating my first Visual Studio project, an inventory database.
I have created a form and used written directions to add data from a
table to the form using table adapters, data sets, etc.

I imported a table from an Access database which has some date fields.
Many of these dates have never been filled in, so are nulls. If I
look directly into the table data from Visual Studio it shows NULL.

However, when I scroll from record to record on the form, any date
field which should be NULL shows today's date, though it doesn't
change it to that date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of today?
I would rather show NULL or blank, e.g. one of the dates is a disposal
date, and the item is not disposed of yet.

How can I change the property on this field to show a blank or the
word NULL rather than today's date? Which property is this, and
where? The form, the table, the TableAdapter???

Thanks,
Mich

Nov 1 '06 #2
Jono

It sound a little bit strange.

Why not create a temporaly project and use a form with a datagridview on it.

Set the datasource in that to your table and see what it shows.

Cor

"M Skabialka" <ms********@NOSPAMdrc.comschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I am creating my first Visual Studio project, an inventory database. I
have
created a form and used written directions to add data from a table to the
form using table adapters, data sets, etc.

I imported a table from an Access database which has some date fields.
Many
of these dates have never been filled in, so are nulls. If I look
directly
into the table data from Visual Studio it shows NULL.

However, when I scroll from record to record on the form, any date field
which should be NULL shows today's date, though it doesn't change it to
that
date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of today? I
would rather show NULL or blank, e.g. one of the dates is a disposal date,
and the item is not disposed of yet.

How can I change the property on this field to show a blank or the word
NULL
rather than today's date? Which property is this, and where? The form,
the
table, the TableAdapter???

Thanks,
Mich

Nov 1 '06 #3
All that does is enable or disable data entry on this field. It still puts
today's date there instead on a blank or NULL entry, which is valid in this
case.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
The DateTimePicker control includes a ShowCheckBox property that lets you
turn date selection on and off with a checkbox. Try setting this field to
True. I haven't tried it with data binding, so I'm not fully sure it will
meet your needs.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>I am creating my first Visual Studio project, an inventory database.
I have created a form and used written directions to add data from a
table to the form using table adapters, data sets, etc.

I imported a table from an Access database which has some date fields.
Many of these dates have never been filled in, so are nulls. If I
look directly into the table data from Visual Studio it shows NULL.

However, when I scroll from record to record on the form, any date
field which should be NULL shows today's date, though it doesn't
change it to that date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of today?
I would rather show NULL or blank, e.g. one of the dates is a disposal
date, and the item is not disposed of yet.

How can I change the property on this field to show a blank or the
word NULL rather than today's date? Which property is this, and
where? The form, the table, the TableAdapter???

Thanks,
Mich


Nov 1 '06 #4
Unfortunately it is a limitation in the DateTimePicker control that it always
shows a date no matter what. I've bumped up against the issue myself, although
since I don't use data binding, I have more control over the situation.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
All that does is enable or disable data entry on this field. It still
puts today's date there instead on a blank or NULL entry, which is
valid in this case.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
>The DateTimePicker control includes a ShowCheckBox property that lets
you turn date selection on and off with a checkbox. Try setting this
field to True. I haven't tried it with data binding, so I'm not fully
sure it will meet your needs.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>>I am creating my first Visual Studio project, an inventory database.
I have created a form and used written directions to add data from a
table to the form using table adapters, data sets, etc.

I imported a table from an Access database which has some date
fields. Many of these dates have never been filled in, so are nulls.
If I look directly into the table data from Visual Studio it shows
NULL.

However, when I scroll from record to record on the form, any date
field which should be NULL shows today's date, though it doesn't
change it to that date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of
today? I would rather show NULL or blank, e.g. one of the dates is a
disposal date, and the item is not disposed of yet.

How can I change the property on this field to show a blank or the
word NULL rather than today's date? Which property is this, and
where? The form, the table, the TableAdapter???

Thanks,
Mich

Nov 1 '06 #5
All date fields which have no data in them show as blanks in the datagrid
view, which is what I want, but I don't want to work from a datagrid. How
can I change the dates to not be DateTimePicker controls, but just regular
data entry fields?

Mich

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eW**************@TK2MSFTNGP03.phx.gbl...
Jono

It sound a little bit strange.

Why not create a temporaly project and use a form with a datagridview on
it.

Set the datasource in that to your table and see what it shows.

Cor

"M Skabialka" <ms********@NOSPAMdrc.comschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I am creating my first Visual Studio project, an inventory database. I
have
created a form and used written directions to add data from a table to
the
form using table adapters, data sets, etc.

I imported a table from an Access database which has some date fields.
Many
of these dates have never been filled in, so are nulls. If I look
directly
into the table data from Visual Studio it shows NULL.

However, when I scroll from record to record on the form, any date field
which should be NULL shows today's date, though it doesn't change it to
that
date (thank goodness!).

Each date field has also been created on the form automatically as a
calendar drop-down box - is this why there is a default date of today? I
would rather show NULL or blank, e.g. one of the dates is a disposal
date,
and the item is not disposed of yet.

How can I change the property on this field to show a blank or the word
NULL
rather than today's date? Which property is this, and where? The form,
the
table, the TableAdapter???

Thanks,
Mich


Nov 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kris M | last post by:
How do i handle a null value for a date variable type. I am retrieving date data from an access database and storing the records in an array for processing. The array field has a date type and the...
19
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below....
1
by: Don Sealer | last post by:
I have a report that includes 5 different subreports. I'd like to be able to open this report using a date function (Start Date and End Date). I'd like all five subreports to show the data from...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
5
by: Irfan | last post by:
Hi All, I am trying to create a report but having problem with the critiera selection logic, please help. I have the following fields date1 date2 date3
14
by: marcokrechting | last post by:
Hi All, I have a rather complex math problem concerning dates. I will try to explain my problem. I have a table with the fields SUBJECT (text), DUE DATE (date) and CHECKED (yes/no). In this...
18
by: PC Datasheet | last post by:
An Access user saw my name in a newsgroup and sent me a request for help on a project. As part of the project, a list of the dates in a month was needed. For anyone needing a list of dates in a...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
3
by: Bob Sanderson | last post by:
I have a PHP web page which uses a HTML form. I would like to enter dates into the date fields using a JavaScript calendar, similar to the way phpMyAdmin does. Can anyone recommend a JavaScript...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.