Mailman,
No not aimed at you but the OP.
David
Dim dtea As Date
dtea = Now()
strsql = ""
strsql = "INSERT INTO [tablex] "
MsgBox strsql
strsql = strsql & " SELECT " & 1 & " As NewID "
MsgBox strsql
strsql = strsql & " ," & dtea & " as SCDateRaised"
MsgBox strsql
strsql = strsql & " , SCDateOfReason = Now() "
MsgBox strsql
strsql = strsql & ";"
MsgBox strsql
Stop
Yes but the clone is not the form's recordset?
And a query is not the clone nore the form's recordset... it is the table itself...
I agree with you though, sticking in the currentdate/time seems strange on these fields unless your creating a new record.(
When I run the above get
"INSERT INTO [tablex] SELECT 1 As NewID ,19/10/2009 15:08:37 as SCDateRaised , SCDateOfReason = Now() ;"
Does this mean the Now() is not being acted upon or am I being naivly ignorant.
If the Recordset solution works, why do you need a query to do it?? The recordset does the same thing... ??? Why look for another solution?
You're correct, I'll retire from this before making a bigger fool of myself, I'm confusing strsql syntax and DLookup type, I've been retired too long
Brian
[rant]
OK one more time, the query is not the problem... THE QUERY IS NOT THE PROBLEM
Yes, the query is OK, it is GOOD, there isnt a problem with it!!
The problem is / has to be someplace else, without further looking into the DB itself I dont think I can see/say anything but please examine closely your column formats and types as well as your form(s) and your expectations...
Somewhere in the chain there is a problem... but.... IT IS NOT THE QUERY and it is not the NOW()
[/rant]
I think that Namliam is upset with me, I did admit that I was getting my wires crossed and that he was correct, but maybe I didn't grovel enough, tuff.
I still don't understand why you cannot put defaults in the table, no! no! ignore me, I'll read the result if its solved.
Brian