Magnus Larsson

Magnus Larsson

  • NA
  • 1
  • 15k

Search access database with multiple criterias

Nov 21 2010 3:42 PM
Hey,

My first time here.

Im completly new to programming and i guess the way i have done the application might not be right (most of the code i have got from somewhere along time ago)

I have a small problem that i cant figure out. I have a windows form with 2 textboxes and a button. its connected to an access database.

I have no trouble searching the database just using 1 textbox.

But when im trying to get 2 searchcriteria to work everything goes bad, well sorta it works in a way but not as i want to.

when i search for just Firstname, i want everyone with that firstname to come up, and ONLY them.
when i search for lastname, i want everyone with that firstname to come up and ONLY them.

And ofcourse when i put something in both boxes i want the perfect match person to come up.

As i said im really new to this and this might be something obvoius but my brain limits me:)

attaching sourcecode

Attachment: test.rar

Answers (2)