Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-22
1
Medium Priority
?
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 150 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 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