By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,839 Members | 2,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,839 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.