User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,601 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,481 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 948 | Replies: 1
Reply
Join Date: Sep 2007
Posts: 23
Reputation: nice_true is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
nice_true nice_true is offline Offline
Newbie Poster

Displaying # value in date field in a data grid.

  #1  
Sep 7th, 2007
Hi!
I am inserting text in a table which contains date field.
In some of the entered records, the date field is to be left blank.
By default, it enters something like "1/1/1900".
Now I wish to display data from this table into a datagrid.
For the records in which the default date specified above is entered, I wish to display the character "#".

Is this possible?
If yes, then how?

Thanks,
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 117
Reputation: manal is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
manal's Avatar
manal manal is offline Offline
Junior Poster

Re: Displaying # value in date field in a data grid.

  #2  
Sep 7th, 2007
yes it is possible

 
       num = Me.DataSet11.Your_Table_name.Count  
        For i = 0 To num - 1
            If Me.DataSet11.Your_Table_name(i).Item("date")="1/1/1900"  then 
              Me.DataGrid1.Item(i, Column_index) = "#"
            End If
        Next
Last edited by manal : Sep 7th, 2007 at 12:11 pm. Reason: to correct the code :)
"give only what u willing to receive "
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 7:05 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC