Hi good people,
I am trying to add automaticaly records to my data base, but I got error code 3134, I think it because the date and time fields
my code is:
Strsql = "INSERT INTO activityclosed ( teachers,project, cost,activity,subject,room,lab,notes,phisics,storage,date,from time, class) "
Strsql = Strsql & "VALUES('" & "dror" & "', '" 'VALUES
Strsql = Strsql & "mada" & "',"
Strsql = Strsql & 77 & ",'"
Strsql = Strsql & "activity" & "','"
Strsql = Strsql & "subject" & "','"
'Strsql = Strsql & 12 & ","""
Strsql = Strsql & "room" & "','"
Strsql = Strsql & "lab" & "','"
Strsql = Strsql & "notes" & "','"
Strsql = Strsql & "phisics" & "','"
Strsql = Strsql & "storage" & "',#"
Strsql = Strsql & "04/04/2009" & "#,#" 'CDate
Strsql = Strsql & "11:15" & "#,'" 'CDate
Strsql = Strsql & "h6" & "');"
MsgBox Strsql
DoCmd.RunSQL Strsql
Thanks,
Inbal
I am trying to add automaticaly records to my data base, but I got error code 3134, I think it because the date and time fields
my code is:
Strsql = "INSERT INTO activityclosed ( teachers,project, cost,activity,subject,room,lab,notes,phisics,storage,date,from time, class) "
Strsql = Strsql & "VALUES('" & "dror" & "', '" 'VALUES
Strsql = Strsql & "mada" & "',"
Strsql = Strsql & 77 & ",'"
Strsql = Strsql & "activity" & "','"
Strsql = Strsql & "subject" & "','"
'Strsql = Strsql & 12 & ","""
Strsql = Strsql & "room" & "','"
Strsql = Strsql & "lab" & "','"
Strsql = Strsql & "notes" & "','"
Strsql = Strsql & "phisics" & "','"
Strsql = Strsql & "storage" & "',#"
Strsql = Strsql & "04/04/2009" & "#,#" 'CDate
Strsql = Strsql & "11:15" & "#,'" 'CDate
Strsql = Strsql & "h6" & "');"
MsgBox Strsql
DoCmd.RunSQL Strsql
Thanks,
Inbal