Solved

showing only date, not time, in Data Form Wizard field from access table

Posted on 2004-08-22
1
143 Views
Last Modified: 2010-04-23
I've used the Data Form Wizard to display/enter dates the user has entered.  It's connected to an access table and it keeps displaying the time even though it's a Short Date in the access table.  I've seen other answers but they all have to do with SQL.  I have very limited experience in sql if it requires coding. Please help.
0
Comment
Question by:chrisamuel
1 Comment
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 50 total points
ID: 11870066
If you don't want to do it in sql use the onformat event of the databinding

something like this

   Private Sub DataForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim oBind As Binding = New Binding("Text", Me.yourdataset, "Table1.yourdate")
        AddHandler oBind.Format, AddressOf formatdate2
        Me.yourtextbox.DataBindings.Add(oBind)

    End Sub


    Private Sub formatdate2(ByVal sender As Object, ByVal cevent As ConvertEventArgs)
        cevent.Value = CType(cevent.Value, Date).ToString("d")
    End Sub
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question