platypus71
Technical User
I've got a working function that obtains the values necessary for this within the following:
I know this works as the function works. Now I find out I need to write into a new table several of these values for tracking purposes.
Since this function will be used in multiple other functions, I am trying to keep it as generic as possible.
Here is what I have:
Then, from the other function, I call this function with
It claims I have a syntax error in my INSERT statement.
Code:
Set rst = mydb.OpenRecordset(sqlstr)
I know this works as the function works. Now I find out I need to write into a new table several of these values for tracking purposes.
Since this function will be used in multiple other functions, I am trying to keep it as generic as possible.
Here is what I have:
Code:
Function TrackingLog(UserID, CourseName, EventID, CourseID, Type)
Dim writelog As String
writelog = "INSERT INTO tblLog ( UserID, CourseName, EventID, CourseID, Type ) IN 'J:\Log.mdb'"
DoCmd.RunSQL writelog
End Function
Then, from the other function, I call this function with
Code:
Dim Y As Boolean
Y = TrackingLog(rst!UserID, rst!CourseName, rst!EventID, rst!CourseID, Type)
It claims I have a syntax error in my INSERT statement.