I get the above error when compiling my code in MS Access 2003. My code is:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [Anger] = -1 Then Me.Text01 = "Anger"
If [Selfishness] = -1 And [Anger] = 0 Then Me.Text01 = "Selfishness"
If [Selfishness] = -1 And [Anger] = -1 Then Me.Text02 = "Selfishness"
If [Laziness] = -1 And [Anger] = 0 And [Selfishness] = 0 Then Me.Text01 = "Laziness"
If [Laziness] = -1 And [Anger] = -1 And [Selfishness] = 0 Then Me.Text02 = "Laziness"
If [Laziness] = -1 And [Anger] = -1 And [Selfishness] = -1 Then Me.Text03 = "Laziness"
If [Hatred] = -1 And [Anger] = 0 And [Selfishness] = 0 And [Laziness] = 0 Then Me.Text01 = "Hatred"
If [Hatred] = -1 And [Anger] = -1 And [Selfishness] = 0 And [Laziness] = 0 Then Me.Text02 = "Hatred"
If [Hatred] = -1 And [Anger] = -1 And [Selfishness] = 0 And [Laziness] = -1 Then Me.Text03 = "Hatred"
If [Hatred] = -1 And [Anger] = -1 And [Selfishness] = -1 And [Laziness] = -1 Then Me.Text04 = "Hatred"
If [Horseplay] = -1 And [Anger] = 0 And [Selfishness] = 0 And [Laziness] = 0 And [Hatred] = 0 Then Me.Text01 = "Horseplay"
If [Horseplay] = -1 And [Anger] = -1 And [Selfishness] = 0 And [Laziness] = 0 And [Hatred] = 0 Then Me.Text02 = "Horseplay"
If [Horseplay] = -1 And [Anger] = -1 And [Selfishness] = 0 And [Laziness] = -1 And [Hatred] = 0 Then Me.Text03 = "Horseplay"
If [Horseplay] = -1 And [Anger] = -1 And [Selfishness] = -1 And [Laziness] = -1 And [Hatred] = 0 Then Me.Text04 = "Horseplay"
If [Horseplay] = -1 And [Anger] = -1 And [Selfishness] = -1 And [Laziness] = -1 And [Hatred] = -1 Then Me.Text05 = "Horseplay"
and more code. I get an error highlighted over [Hatred} on the last line shown; yet, you can see that this was successfully used several times previously. I've read something about a 'bug' in Access2003 which causes something like this and the answer was to put in quote on the line where the error is shown. I don't understand this.
I'm not very familiar with Access and even less so with
VB.
Can anyone help?
Thanks Ultimo01