473,387 Members | 1,464 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,387 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 1432
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...
14
by: jpr | last post by:
Friends, I have a form with four fields, date1, date2, date3 and date4. All these have all a mm/dd/yyyy format and have their source to a table. I need to add an unbound control (I will name...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
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,...
0
jinu1996
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...

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.