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 .
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,576
Office Version
2013
Platform
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*')
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,731
Office Version
365
Platform
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.
 

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.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,731
Office Version
365
Platform
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.
 

Forum statistics

Threads
1,084,878
Messages
5,380,415
Members
401,673
Latest member
Ali Balleya

Some videos you may like

This Week's Hot Topics

Top