Welcome to the forum..
OK, there are several things going on here.
First, there are two forms of the IF function. One form is the single line syntax. It was used to be used in the early days to save on program space.
It is the single line form :
Code:
If A = B THEN C=c+12
The other form is the multiline:
Code:
If A = B Then
C = C+12
End IF
The multiline syntax is the most used because it allows you more instructions within the function (and is easier to read).
Second, you cannot refer to a field in a table using the syntax you provided. You have to use a bound form or a recordset in code.
Code:
If Me.AdjustmentTypeID = 6 Or Me.AdjustmentTypeID = 7 Then
total = total + Me.AdjustmentQuantity
Else
total = total - Me.AdjustmentQuantity
End If
If you use a bound form, you would use the name of the control that is bound to the field. The "Me" is a shortcut that refers to the form that is active.
Notice that the control name is repeated in the first line. You have to explicitly name the control for multiple comparisons.
And finally, a number 6 is different than a text 6 ("6"). Putting quotes around a number (known as delimiting) or letter(s) tells Access "This is a string of text".