J
Jimmy Warpup
can anyone tell me why this code only runs the "else" case?
Private Sub French_Word_BeforeUpdate(Cancel As Integer)
A = IsNull(DLookup("[French_Word]", "[Words]", "[French_Word] = """ &
Me![French_Word] & """"))
MsgBox A
'returns correct value, false if the entry already exists, true if it does
not.
Select Case Me.French_Word
Case A = "False"
'also tried false with quotes and False without quotes
MsgBox "first case"
Exit Sub
Case A = "True"
'also tried true and True without quotes
MsgBox "second case"
exit sub
Case Else
MsgBox "No workie workie " & Me!French_Word & " " & A
'always displays this message box whether the entry is in the database or
not, A still has the right value. false if the entery exists true if it
does not.
Exit Sub
End Select
End Sub
Private Sub French_Word_BeforeUpdate(Cancel As Integer)
A = IsNull(DLookup("[French_Word]", "[Words]", "[French_Word] = """ &
Me![French_Word] & """"))
MsgBox A
'returns correct value, false if the entry already exists, true if it does
not.
Select Case Me.French_Word
Case A = "False"
'also tried false with quotes and False without quotes
MsgBox "first case"
Exit Sub
Case A = "True"
'also tried true and True without quotes
MsgBox "second case"
exit sub
Case Else
MsgBox "No workie workie " & Me!French_Word & " " & A
'always displays this message box whether the entry is in the database or
not, A still has the right value. false if the entery exists true if it
does not.
Exit Sub
End Select
End Sub