I have the following SQL statement for adding records in Microsoft Access. When I run the statement, every field gets added correctly except the boolean field, which should always be false. However, it always adds the record with the default boolean value (true).
Dim strSQL As String
strSQL = "INSERT INTO Part VALUES ('" & Me.IdPartPrimary.Value & "', '" & Me.NamePartPrimary.Value & "', '" & Me.BrandPartPrimary.Value & "', '" & Me.ModelPartPrimary.Value & "', '" & Me.FunctionPartPrimary.Value & "', 0, '" & Me.FatherPartPrimary.Value & "', '" & Me.ProviderPartPrimary.Value & "', '" & Me.AmountPartPrimary.Value & "');"
DoCmd.RunSQL strSQL
Things I've tried:
- Putting the 0 between ' '
- Replacing the 0 with the word false, False and No
I can't set false to be the default value because what I need is for it to be different from the default value