Hi all, I'm freshie in Microsoft Access (VB). Hope you guys can enlighten me.
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.
When i checked the table it's overwrite. Please help me.
Thanks in advanced,
Amira
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.
Code:
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
Comment