Please assist with adding the value of Text34 from the user into thisParcel expression on MS ACCESS. I get a 3075 run time error when I run the code. I have rechecked my indentation, missing operators, but I cannot find the problem.
Private Sub Command10_Click()
DoCmd.SetWarnings (WarningsOff)
i = Val(Text2.Value)
w = Val(Text34.Value)
If Text8 = "" Or IsNull(Text8) Then
TrueOrFalse = 0
Else
TrueOrFalse = -1
End If
If IsNull(Len(List0.Value)) Then
MsgBox "Choose allotment area"
Exit Sub
End If
thisParcel = List0.Value & Left("00000000", 8 - Len(Trim(Str(i)))) & Trim(Str(i)) +
Left("00000", 5 - Len(Trim(Str(w)))) & Trim(Str(w))
DoCmd.RunSQL "INSERT INTO Schedule ( DiagramNo, OnGP, GPNo, ParcelCode, DiagramDeedNo ) VALUES ( '" & Text6.Value & "', " & TrueOrFalse & " , '" & Text8.Value & "' , '" & thisParcel & " , '" & Text22 & "');"