Anyway I will be building a form that has several fields on it, I would like to add these fields to a table using a command button so that when I click on the button it inserts the data, closes the form, and then moves on.
I looked on the prefab databases for a refresher and got nowhere. so I created a button, viewed the onclick event and this is what I got:
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
Where can I amnually add sql or how do I manually add an insert staement to this?
I looked on the prefab databases for a refresher and got nowhere. so I created a button, viewed the onclick event and this is what I got:
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
Where can I amnually add sql or how do I manually add an insert staement to this?