OK, try this:
Code:
Private Sub btnSave_Click()
Dim d As DAO.Database
Dim i As Integer
Dim sSQL As String
Set d = CurrentDb
For i = 1 To 5
If Me("V" & i) <> Me.ubCarNumber Then
sSQL = "INSERT INTO tVote2 ( BarCodeID_FK, Car_Number, CarVotedFor, VoteDate )"
sSQL = sSQL & " VALUES ( " & Me.ubBarCode & ", " & Me.ubCarNumber & ", " & Me("V" & i) & ", #" & ubVoteDate & "#);"
' Debug.Print sSQL
d.Execute sSQL, dbFailOnError
End If
Next
Me.ubBarCode = Null
Me.ubCarNumber = Null
Me.V1 = Null
Me.V2 = Null
Me.V3 = Null
Me.V4 = Null
Me.V5 = Null
Set d = Nothing '<<-- added line
End Sub
Note that I added a line at the bottom of the sub. I hate it when I do that!!