|
-
Date comes out as Time after using DATE in VBA
Hi ,
I am using Access 2000 VBA. When I append to a table using VBA and sql statments
the date comes out as time. I have formatted all fields and text boxes and
get an overflow message when I try to format Date in VBA.
Here is my code
sql = "INSERT INTO Employees( Empl_No, details_No, Start_Date)"
sql = sql & " SELECT " & Chr(34) & NewEmplNo & Chr(34)
sql = sql & ", " & Chr(34) & Me.Details_No & Chr(34) & ", " & Date DoCmd.RunSQL
(sql)
When I look at the record after the append the date shows the time instead
and when I formatted in vba using the following I get an overflow error:
Dim strDate As Date
strDate = Date
strDate = Format(strDate, dd / mm / yyyy)' I get the overflow error here
Thanks for any help
Gill
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks