Search button on a Data Page

mzeigler

New Member
Joined
Nov 22, 2005
Messages
1
I have the database and the Data page, but how do I add a search button to the data page to search the database by a certain field? Any help would be appreciated. I would be happy to send you the files if you give me a contact.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
There's a quick way to get started. You can make it more sophisticated later if you wish.

You will need:
A form based on a table or query
A button to do the search. We'll use a wizard for this.

OK, if your data is already in a form, you can use that. Otherwise, you can create a form by doing the following:
1. Select the table or query that you want to use as the data source for the form.
2. At the right end of the toolbar is a datasheet icon with a lightning bolt on it. When you move your mouse over it, it will say Autoform - Columnar. Click this button. You now have a form with all the fields from the table. Not pretty but it works.
3. Save this form. When prompted for a name, it will suggest the name of the table or query that you used. Put frm at the front of this name: it helps you later to tell whether you're working with the table directly, or the form based on the table.
4. Now go into Design view in the form. On the View menu, choose Form Header / Footer. You will now have a blank section at the top of the form.
5. Click on the Toolbox button to display the toolbox, and click the wand icon to make sure the Wizards are activated. Now, drag a Command Button onto the header section of the form and let go. The Wizard will launch. The dialog asks you what category to choose from. Click Record Navigation, select Find Record from the second pane, and click Next. Now you will be asked to choose a caption or image for the button. PIck what you want, click Next and Next or Finish again.
6. Save the form and go into Data view. When you click the button, you'll get the Find dialog. It will look in whatever field you currently have selected.

Lots of words but I couldn't easily insert screenshots. Hope this helps.

Denis
 
Upvote 0
If you add a control button to a data access page you do not get the option to "Find Record" in the wizard, this only works on a form, either that or i'm doing something wrong :confused:

I'd be interested if it could be done simply on a data access page if anybody knows, thanks :)
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

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