Get rid of Time in textbox bound to access

Hey everyone,

I have a form with a few textboxes that have databindings to an access database. My problem is that the date fields are filling in with the time as well as the date .I want to get rid of the time ...where always comes up 12:00:00 AM . I just want a Date in the format MM/dd/yyyy , i changed the format of the field in access to be short date but i still get the time.

csakg6s0Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gbzhhuCommented:
I think you need to use DataBindings properti'es Format method.  I don't have DB engine to test here at home but can do tomorrow at work

Out of my head just guess try

        Me.TextBox1.DataBindings.Item(0).FormatString = "mm/dd/yyyy"

in form load must be after you set the databindings for the textbox.  If it dopesn't work and nobody else comes with a solution post a comment tomorrow and I will have a go

Cheers
0
gbzhhuCommented:
I could change the textbox text from a button click using

            Me.TextBox1.Text = Format(Me.TextBox1.Text, "mm/dd/yyyy")

But that cannot be done in the textbox's TextChange event.  events will be recursively raised
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
manojkumarpsCommented:
Hello csakg6s0,
         As you are displaying the text in the textbox. You are getting it from the Db whatever it is and then assigning it to the textbox. before assigning the value to the textbox. COnvert the date explicitely to shortdatestring.

Regards,
Manoj
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.