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

x
?
Solved

Date data from VB to Access

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

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

610 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