Solved

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

Posted on 2004-08-22
1
141 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now