Error message if duplicate data entered
well, maybe with a textbox...heh J
Zone wrote:
Realm, You are most welcome. As usual, I have learned something from
answering a post. Your approach to the problem is interesting. I've
never used the .Text property with either a textbox or a cell. This
property seems to be interpreting the two variables as text, regardless
of what they are, so I'll file that away for future reference.
Tally-ho! James
RealmSteel wrote:
You were right. I didn't think about that.
This is all I had to do:
If txtRFINum.Text = ActiveCell.Value Or txtRFINum.Text =
ActiveCell.Text Then
MsgBox "RFI Number Exists! Try Different Number."
GoTo DupRFI
Thanks a ton.
Rich
Zone wrote:
Realm,
Just a guess. Textbox values are text, so comparing a textbox value to
a number isn't going to work. How about this:
If Val(txtRFINum.Value) = ActiveCell.Value Then
Not tested! HTH, James
|