Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert date loses format Access VBA

Status
Not open for further replies.

pingit

MIS
Nov 24, 2003
37
0
0
NZ
Hello All

I am inserting a date collected from a text box into a table. when the date is inserted using an access query the date appears in the table dd/mm/yyyy. When i build the query in vba and use DoCmd.RunSQL strSQL the time is inserted
Access query 25/08/2008
DoCmd.RunSQL 12:02:14 a.m.

When i debug and step through the date appears 25/08/2008 but inserts differently

All help appreciated
Cheers
 
-> but inserts differently

Differently how? What do you see in the table?

What is the format of the field in the Access table (as seen under "Data Type" in Design View)?

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 





And what is the SQL that you are executing?

No crystal balls today.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top