Hello
I would like to insert the Date and Time, but when I test this code it
insert only date.
How it is possible to insert in the same filed date + time ?
DoCmd.RunSQL "INSERT INTO Tillgangar ( Anvand, now, Mobiltelefon ) SELECT 1,
Date() , [Mobiltelefon];"
Thank you
John W. Vinson - 13 Mar 2008 21:00 GMT
>Hello
>
[quoted text clipped - 6 lines]
>
>Thank you
Date() inserts the current date. Now() inserts the date and time. Just replace
the Date() in the insert clause with Now().

Signature
John W. Vinson [MVP]
Barcode - 13 Mar 2008 21:15 GMT
Thank you very much
Jesus Blease
Douglas J. Steele - 13 Mar 2008 22:12 GMT
In addition to the advice John gave you, I'd strongly recommend that you
rename the field in your table named Now. Now is a reserved word, and using
it for your own purposes can lead to all sorts of problems.
For a good discussion on what names to avoid, see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Hello
>
[quoted text clipped - 7 lines]
>
> Thank you