Hello everyone
I am getting a syntax error in the sql statment while updating the database. I can't seem to find an error.
Below is the update statement I am using
TmpString = ""
TmpString = "UPDATE tblUserGroups "
TmpString = TmpString & " SET FirstName = '" & Apostrophe(ProperCase(Trim$(TextBox(0).Text))) & "', "
TmpString = TmpString & "LastName = '" & Apostrophe(ProperCase(Trim$(TextBox(1).Text))) & "', "
TmpString = TmpString & "UserFullName = '" & Apostrophe(ProperCase(Trim$(TextBox(2).Text))) & "', "
TmpString = TmpString & "MidInit = '" & Apostrophe(Trim$(TextBox(3).Text)) & "', "
TmpString = TmpString & "strUserName = '" & Apostrophe(Trim$(TextBox(4).Text)) & "',"
TmpString = TmpString & "Password = '" & Apostrophe(Trim$(TextBox(5).Text)) & "', "
TmpString = TmpString & "Access_Level = '" & Apostrophe(ProperCase(Trim$(ComboBox(0).Text))) & "', "
TmpString = TmpString & "TitleID = " & lngTitle & ", "
TmpString = TmpString & "WHERE strUserName = '" & tmpUserName & "'"
Does anyone see a problem with this update statement?
Thank you
ParyGoal
I am getting a syntax error in the sql statment while updating the database. I can't seem to find an error.
Below is the update statement I am using
TmpString = ""
TmpString = "UPDATE tblUserGroups "
TmpString = TmpString & " SET FirstName = '" & Apostrophe(ProperCase(Trim$(TextBox(0).Text))) & "', "
TmpString = TmpString & "LastName = '" & Apostrophe(ProperCase(Trim$(TextBox(1).Text))) & "', "
TmpString = TmpString & "UserFullName = '" & Apostrophe(ProperCase(Trim$(TextBox(2).Text))) & "', "
TmpString = TmpString & "MidInit = '" & Apostrophe(Trim$(TextBox(3).Text)) & "', "
TmpString = TmpString & "strUserName = '" & Apostrophe(Trim$(TextBox(4).Text)) & "',"
TmpString = TmpString & "Password = '" & Apostrophe(Trim$(TextBox(5).Text)) & "', "
TmpString = TmpString & "Access_Level = '" & Apostrophe(ProperCase(Trim$(ComboBox(0).Text))) & "', "
TmpString = TmpString & "TitleID = " & lngTitle & ", "
TmpString = TmpString & "WHERE strUserName = '" & tmpUserName & "'"
Does anyone see a problem with this update statement?
Thank you
ParyGoal