A
Art Vandaley
Hi,
I have following code in order to Append data into a table and have two
questions:
DoCmd.RunSQL "INSERT INTO [tablename] ( [field1], [field2], [field3] )" & _
"VALUES (" & Z & ", 'aaa'," & Date & ")"
Z is variant as integer. "aaa" is a string. Date is Date function.
Q1) I want to add current date but Date function is creating problem
something like syntax error. What can I do?
Q2) I want to cancel message box coming every time in FOR...NEXT loop and
telling "1 row will be added". How?
Thanks a lot for the answers in advance. Regards.
PS. Thanks to Van T. Dinh, John Vinson, Steve Schapel and GM for their
answer to my prior questions.
I have following code in order to Append data into a table and have two
questions:
DoCmd.RunSQL "INSERT INTO [tablename] ( [field1], [field2], [field3] )" & _
"VALUES (" & Z & ", 'aaa'," & Date & ")"
Z is variant as integer. "aaa" is a string. Date is Date function.
Q1) I want to add current date but Date function is creating problem
something like syntax error. What can I do?
Q2) I want to cancel message box coming every time in FOR...NEXT loop and
telling "1 row will be added". How?
Thanks a lot for the answers in advance. Regards.
PS. Thanks to Van T. Dinh, John Vinson, Steve Schapel and GM for their
answer to my prior questions.