|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
NULL dates show today's date rather than a blank or NULL on formcreated 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 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 Show quoteHide quote > 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 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. Show quoteHide quote "Tim Patrick" <inva***@invalid.com.invalid> wrote in message news:e3b46976166a8c8cbad47ecb792@newsgroups.comcast.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 > > 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 Show quoteHide quote > 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" <inva***@invalid.com.invalid> wrote in message > news:e3b46976166a8c8cbad47ecb792@newsgroups.comcast.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 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 Show quoteHide quote "M Skabialka" <mskabialka@NOSPAMdrc.com> schreef in bericht news:%23gUv4Zd$GHA.4496@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 > 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 Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:eWMZyHe$GHA.4328@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" <mskabialka@NOSPAMdrc.com> schreef in bericht > news:%23gUv4Zd$GHA.4496@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 >> > > |
|||||||||||||||||||||||