By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,659 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,659 IT Pros & Developers. It's quick & easy.

create a search form

P: 3
i have developed a small database in access 2013. i have a table (tbl_beneficiary) with the following fields:
1. groupid as text
2. groupname as text
3. Lperson as text
4. lphoto as attachment

i have created a form for using this table [frm_beneficiary]. i want to create a search function within this [frm_beneficiry] to search for: lperson, groupid, lphoto, etc.
I want to know how to use VB codes in order to perform the search function.
please see attachment for full details.
Attached Files
File Type: docx IGA tables relation.docx (229.0 KB, 142 views)
Oct 30 '17 #1
Share this Question
Share on Google+
2 Replies

P: 16

Not sure the reasoning behind VBA, however if you would like to use a query to drive the form...

Create query to drive "frm_beneficiry" with the elements you would like to see.

Create an unbound text box control [filterText] on your search form.

Create a cmd_button to requery results (
Expand|Select|Wrap|Line Numbers
  1.  DoCmd.Requery 
)(after user puts information in the box they can launch the query).

Under each of the desired search fields add the following to the criteria; for multiple ensure the others are in the "or" column.


Expand|Select|Wrap|Line Numbers
  1. Like "*" & [Forms]![frm_beneficiry]![filterText] & "*" 
There are also a few examples that will filter the data as you type, however, I have noticed the performance quickly nose dives with medium to large databases.

Best of Luck,
Oct 30 '17 #2

Expert Mod 15k+
P: 31,487
please see attachment for full details.
That's not how it's supposed to work.

Please read the threads explaining how properly to ask your question. It is your responsibility to express the question as clearly as you can in the thread.

You are likely to find that very few experts have the patience download attachments just to get to where they should have been simply by opening the thread.

I'll leave it with you to ensure any future questions are presented properly in the thread.
Oct 31 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.