<i><b>Originally posted by : Steve H (samiz@msn.com)</b></i><br />I need define a table field with the creation date for a new record. It's for a form that users will fill out on our web site. When the form is submitted, the user's information will be written to a new record in the database. I need to automatically insert the record creation date mainly for searching & sorting later on. I have defined a field in Access called "createtime". Something is off in the last SQLStatement, it always throws the error message: <br /><br /><br />Microsoft VBScript runtime error '800a000d' <br /><br />Type mismatch: 'Format' <br />================================ <br /><br /><br />The SQL statement is as follows:<br /><br /><br />SQLStatement = "INSERT INTO Questions (CustEMail, Technology, Question, createtime)" <br />SQLStatement = SQLStatement & "VALUES('" & Request.Form("CustEMail") & "'" <br />SQLStatement = SQLStatement & ",'" & Request.Form("Technology") & "'" <br />SQLStatement = SQLStatement & ",'" & Request.Form("Question") & "'" <br />SQLStatement = SQLStatement & ", #" & Format(Now(),"mm/dd/yyyy hh:nn:ss AM/PM") & "#)" <br /><br /><br /><br />---------------------------<br />Any suggestions appreciated<br /><br /><br />
<i><b>Originally posted by : Mike B (mikeb811@hotmail.com)</b></i><br />try changing from<br /><br />SQLStatement = SQLStatement & ", #" & Format(Now(),"mm/dd/yyyy hh:nn:ss AM/PM") & "#)" <br /><br />to<br /><br />SQLStatement = SQLStatement & ", #" & Format(Now(),"mm/dd/yyyy hh:mm:ss AM/PM") & "#)" <br /> difference----^^<br /><br />Hope this helps<br /><br />Mike<br /><br />------------<br />Steve H at 5/18/2000 6:26:13 PM<br /><br />I need define a table field with the creation date for a new record. It's for a form that users will fill out on our web site. When the form is submitted, the user's information will be written to a new record in the database. I need to automatically insert the record creation date mainly for searching & sorting later on. I have defined a field in Access called "createtime". Something is off in the last SQLStatement, it always throws the error message: <br /><br /><br />Microsoft VBScript runtime error '800a000d' <br /><br />Type mismatch: 'Format' <br />================================ <br /><br /><br />The SQL statement is as follows:<br /><br /><br />SQLStatement = "INSERT INTO Questions (CustEMail, Technology, Question, createtime)" <br />SQLStatement = SQLStatement & "VALUES('" & Request.Form("CustEMail") & "'" <br />SQLStatement = SQLStatement & ",'" & Request.Form("Technology") & "'" <br />SQLStatement = SQLStatement & ",'" & Request.Form("Question") & "'" <br />SQLStatement = SQLStatement & ", #" & Format(Now(),"mm/dd/yyyy hh:nn:ss AM/PM") & "#)" <br /><br /><br /><br />---------------------------<br />Any suggestions appreciated<br /><br /><br />
Was this answer helpful ?
Yes No