search on multiple fields

Pretty1996

Board Regular
Joined
Apr 28, 2010
Messages
100
Hi guys I need a little advice/guidance with searching for a record based on multiple fields.

Basically I have a list box which I've set up to 'Find a record on my form based on a value I selected in my list box'

The problem I have is that it only returns a record based on 1 field.

so for example it will only return a record based on 'First Name' where as I'd like to base my return on both 'First Name' and 'Last Name'

I hope I'm making sense and I appreciate any advice you may have.

Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
How is the search currently structured? Is it a query that returns search results, but based on a variable in a form? If so what you can do is in the design of the query use the "Or" line when entering criteria. Experiment with that a bit and see if that works.

Another thing that you can do is to concatenate the fields that you want to search, and then search that new concatenated field for the value that you are looking for.

Hope this gives you a bit of direction.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top