Code:
Option Compare Database
Private Sub btnNewRace_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tbl_Race", dbOpenDynaset)
rs.AddNew
!RaceName = Me.txt_RaceName
!Season = Me.lst_Season
!SchemeID = Me.lst_SchemeID
rs.Update
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
Im having an issue with this code, it says
An identifier beginning with a period is valid only within a With block. This error has the following cause and solution:
- The identifier begins with a period. Complete the qualification of the identifier or remove the period..