Solved

Date data from VB to Access

Posted on 1998-06-09
1
120 Views
Last Modified: 2010-05-03
I retrieve the date from Access. The Access input mask for the date is 99/99/00;0. The date from Access is placed in a Msked Edit Box in VB.  It comes in correctly with no Mask set and the format set to d/M/yy.  When I change the date and send it back to Access I get a Data Conversion Error because it sends the date back as say, 9698 (June 6, 1998).  I was wondering how to send it back so that it will save it correctly.  Also, if I put a mask such as ##/##/## in so that the user has to enter 6 numbers for the date then the date does not necessarily come back from Access correctly after it is saved from VB. (ex: Access: 1/12/98-> VB: 11/28/9) How would I correct this also?
0
Comment
Question by:paulcarroll
1 Comment
 

Accepted Solution

by:
gkaziberdov earned 30 total points
ID: 1462968
First, check if the field in Access you are writing to is set up as a date field not a text field.
Second you could try '.FormattedText' property of the Masked Edit Box.
You should also make sure the the 'Include Literals' is checked in the properties.


0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

22 Experts available now in Live!

Get 1:1 Help Now