G
Guest
Hello I have the following code:
strQcode = "INSERT INTO comments (memid, posted, postedby, subject,
type) " & _
"SELECT " & Me.memid & " AS Expr1, Format(Now(),'dd/mm/yy hh:nn
AM/PM') AS Expr2, '" & _
UserInitials & "' AS Expr3, '" & Me.examcode & " " & par & "
Exemption From " & _
Me.cboexamcode & " approved' AS Expr4, 'Comment' AS Expr5;"
CurrentDb.Execute strQcode
CurrentDb.Close
Memid is an Autonumber and the form is based on the table with that field.
There is also a text box bound to it and called memid on the form. When I try
to debug the code it flags that and says it cant find it. When I type Me
followed by a '.' it lists memid.
I have tried creating a new text box and binding it to it and changing the
code but it still comes up.
many thanks to anyone who can help.
James
strQcode = "INSERT INTO comments (memid, posted, postedby, subject,
type) " & _
"SELECT " & Me.memid & " AS Expr1, Format(Now(),'dd/mm/yy hh:nn
AM/PM') AS Expr2, '" & _
UserInitials & "' AS Expr3, '" & Me.examcode & " " & par & "
Exemption From " & _
Me.cboexamcode & " approved' AS Expr4, 'Comment' AS Expr5;"
CurrentDb.Execute strQcode
CurrentDb.Close
Memid is an Autonumber and the form is based on the table with that field.
There is also a text box bound to it and called memid on the form. When I try
to debug the code it flags that and says it cant find it. When I type Me
followed by a '.' it lists memid.
I have tried creating a new text box and binding it to it and changing the
code but it still comes up.
many thanks to anyone who can help.
James