Hi I have a button that inserts the value in a textbox into a table. The sql looks fine to me, but the problem is when I click the button a box appears and you have to enter a value into this before it is inserted into the table .
Private Sub cmdAddGroup_Click()
'Sql statement inserts the value entered in the text box into the group table
AddGroupsql = "insert into [Group] (group_name) Values (" & txtNewGroup.Value & ")"
'Runs the SQL statement
Try AddGroupsql = "insert into [Group] (group_name) Values ('" & me.txtNewGroup & "')"
(there are some apostrophies in there).
If it still doesn't work, let us know what the message is on the input box.