abdullahsikandar

Board Regular
Joined
Feb 10, 2014
Messages
52
Hi Guys,

Thanks in advance for helping me before, I need your help again guys.

I have a database with me with 5 columns in it with the name of Name, Age, Address, Phone number and Position. I need a searching criteria for them to make the reports.

I made the form on excel with the text boxes and label:

Name=[ ]
Age= [ ]
Address=[ ]
Phone Number= [ ]
Position= [ ]


What i am trying to do is that the user can write whatever he want to in this fields and search it. Once it comes with the result it will automatically export the the output data into the excel with the formatted fields.

Thanks in Advance please guys help me .
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,836
Office Version
  1. 2019
Platform
  1. Windows
Hi,
A typical strategy here is to use LIKE.

Once the textboxes are filled in you have a command button that runs a query such as:
Code:
SELECT * FROM Table WHERE [Name] LIKE '*" & Me.txtName.Value & "*' AND [Age] LIKE '*" & Me.txtAge.Value & "*' AND ... etc. etc. etc.

The Like criteria allows for the textboxes to be blank (LIKE '**') or to be filled in (LIKE '*xyz*')
 
Upvote 0

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
66,532
Office Version
  1. 365
Platform
  1. Windows
Cross-posted: Database Access Search

You got an answer here, so why did you ask the question again somewhere else instead of following up on the response?

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #10 here: Forum Rules).

This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered. For a more complete explanation on cross-posting, see here: Forum Rules).

You may want to do the same on the other site too.
 
Upvote 0

abdullahsikandar

Board Regular
Joined
Feb 10, 2014
Messages
52
Cross-posted: Database Access Search

You got an answer here, so why did you ask the question again somewhere else instead of following up on the response?

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #10 here: Forum Rules).

This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered. For a more complete explanation on cross-posting, see here: Forum Rules).

You may want to do the same on the other site too.



I am sorry for not posting the link here, Secondly i didn`t get an answer till today as i have posted this yesterday so that will be the reason i posted this on other forum.
 
Upvote 0

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
66,532
Office Version
  1. 365
Platform
  1. Windows
Secondly i didn`t get an answer till today as i have posted this yesterday so that will be the reason i posted this on other forum.
:confused:
xenou's response to this question was 31 minutes prior to your post at AccessForums.net.
 
Upvote 0

Forum statistics

Threads
1,186,559
Messages
5,958,489
Members
438,361
Latest member
mihi78

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
Top