I'm trying to develop database and facing few problem. When i want to add data by using form, the data will overwrite the old data in table.
In form have sub-form which i want it's live update but it's said "Syntax Error in Insert statement"
Below are the coding that i used.
Expand|Select|Wrap|Line Numbers
- Private Sub cmdAdd_Click()
- Dim strSQL As String
- strSQL = "INSERT INTO Access_Fullsite (Site ID, Current Band) VALUES (" & Me!SiteID & ", '" & Current_Band & "');"
- DoCmd.RunSQL strSQL
- Access_FulSite_Subform.Form.Requery
- Me.Requery
- End Sub
Thanks in advanced,
Amira