I was given this sql code to add to a form so that the text and combo boxes would be inserted into the tables. but I do not even no where to begin or if the code is any good.
Dim strNewRecord As String
Dim strSQL As String
Dim rst As Recordset
Dim dbs As Database
Set dbs = CurrentDb
DoCmd.RunSQL "insert into Fork values(Me![gserial],me![cmbtype])"
'Set rst = dbs.OpenRecordset(strNewRecord)
DoCmd.RunSQL "insert into fork_2 values(Me![ssn],me![tageqid],me![issuedate],me![updated])"
DoCmd.SetWarnings False
DoCmd.SetWarnings True
DoCmd.GoToRecord , , acPrevious
Me.Refresh
Dim strNewRecord As String
Dim strSQL As String
Dim rst As Recordset
Dim dbs As Database
Set dbs = CurrentDb
DoCmd.RunSQL "insert into Fork values(Me![gserial],me![cmbtype])"
'Set rst = dbs.OpenRecordset(strNewRecord)
DoCmd.RunSQL "insert into fork_2 values(Me![ssn],me![tageqid],me![issuedate],me![updated])"
DoCmd.SetWarnings False
DoCmd.SetWarnings True
DoCmd.GoToRecord , , acPrevious
Me.Refresh