Hello. I am new to Visual Basic and am trying to program a command button. One of the fields is bound to a corresponding datasheet. I am trying to make the button search for the record in the datasheet given the data in the form. If it is found I want there to be an error message but if it's not I want it to do some other stuff. Any help would be great.