Can someone help me out on this line of code. I'm trying to get the program to add a new record to the 'temp' table.
I can get it to run without any problems, but it does not add anything to the table. By-the-way, the 'temp' table has a unique record ID (autonumber).
Here's the code:
Dim dbs As Database
Set dbs = CurrentDb
Port_Type = "M"
Date1 = Format(Now, "MM/DD/YY"
Date3 = Format(Now, "MM/DD/YY"
Eff_Time = Format(Now, "HH:MM"
Status = "- Done -"
Comments = z
dbs.Execute "INSERT INTO temp " & _
"(Port_Type, Date_Request, Date_Effective,Effective_Time, Status, Comments) VALUES " & _
"( '" & Port_Type & "','" & Date1 & "','" & Date3 & "','" & Eff_Time & "','" & Status & "','" & Comments & "');" -illini
I can get it to run without any problems, but it does not add anything to the table. By-the-way, the 'temp' table has a unique record ID (autonumber).
Here's the code:
Dim dbs As Database
Set dbs = CurrentDb
Port_Type = "M"
Date1 = Format(Now, "MM/DD/YY"
Date3 = Format(Now, "MM/DD/YY"
Eff_Time = Format(Now, "HH:MM"
Status = "- Done -"
Comments = z
dbs.Execute "INSERT INTO temp " & _
"(Port_Type, Date_Request, Date_Effective,Effective_Time, Status, Comments) VALUES " & _
"( '" & Port_Type & "','" & Date1 & "','" & Date3 & "','" & Eff_Time & "','" & Status & "','" & Comments & "');" -illini