Last post Oct 29, 2013 02:50 AM by hans_v
Oct 28, 2013 01:32 PM|terje0401|LINK
I have an issue in Access when i try to updata a table called User. I have made a form called frmGRPE with text fields where i retrives information (user information) from a database called tblUser. I can retrive the information from the database, but the
problem starts when i trie to save the changes in the form back in to the databse. I use the function UPDATE for this and i can almost get this to work. Below is two expressions where the first gives me syntax error and the other inputs ME.txtEN.Value into
the correct location in the databse(obviously since i put ME.txtEN.Value inside
My question is why does this this work (second expression) when i SET sepcific value from code intot the databse, but when i try to get this value from the txtEN field in the form form i get syntax error?!!
Thanx in advance for any help on this issue!!
Oct 28, 2013 01:36 PM|smirnov|LINK
CurrentDb.Execute "UPDATE tblUser SET Employee_Number= '" & Me.txtEN.Value & "' Where [User_ID]=" & Me.txtUser.Value
Oct 28, 2013 01:50 PM|terje0401|LINK
Than you so much!!
I have scratche my head for 2 days on such a simple problem. Also i am really impressd with how fast i got a reply on my question!
Oct 29, 2013 02:50 AM|hans_v|LINK
That might be true, but sooner or later you'll encounter a much more serious problem if you continue like this! Start using parameterized queries to prevent SQL injections....