value driven if then statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, I have the below series of statements, but when I place the word Inbox in
the field "stresseng", it seems to not acknowledge it. The code is below, but
what I'm doing is I'm checking if stresseng has a value, and if it does, I
need to check if that value is inbox. If it is, then I need to keep the
"stresscheck" checkbox checked. If anything else is in the stresseng field, I
want to uncheck the checkbox. Finally, if there's nothing in the stresseng
field, I want to keep the stresscheck checked. Let me know if you notice any
thing off. BTW, the stresseng field is from a combo box.


If Not IsNull(Me.stresseng.Value) Then
If Me.stresseng.Value = "Inbox" Then
Me.StressCheck = True

Else
Me.StressCheck = False

End If

Else
Me.StressCheck = True
End If
 
yes,
I have used a message box to confirm that it gets through everything, but
goes to the else part of the if then statement which addresses the inbox
entry. I have placed the location where I put this messagebox below.
Thanks
 
Thanks for the suggestion.
Actually, I just placed a messagebox in the code and found that for inbox,
me.stresseng came up as being "15". This came from the Primary Key from the
table I built the combo box from. To fix it, I used my original code and
moved the id column to the second position. It seems to work fine now.
 

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

Back
Top