?
Solved

Date data from VB to Access

Posted on 1998-06-09
1
Medium Priority
?
127 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
[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
 

Accepted Solution

by:
gkaziberdov earned 60 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

800 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