Solved

Date data from VB to Access

Posted on 1998-06-09
1
124 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
Put text in a picture ASP.NET C# 2 61
Hide vba in gp 7 104
Modifying Conditional Format from VBA code 3 60
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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

837 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