still having trouble

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top