Using Find Feature

kermit5

Registered User.
Local time
Today, 02:33
Joined
Nov 2, 2001
Messages
122
Is there a way to set up a find feature available via right clicking on a control? That is to say, I have a control that contains the names of projects. It is a combo box that finds the record according to the project selected. I would like the user to be able to right click this field and have find or search available.

Can this be done? If not, what is the easiest way to accomplish my find needs?

Thanks in advance.
Scott
 
Never tried it on a combobox, but couldn't hurt to try (this works on text boxes).

First you have to create a custom shortcut menu on which you place the find command (normally part of the Edit menu bar).

From Access help (primarily):
This can be brought up by entering "shortcut menus" in the help wizard, then selecting "working with menu bars and shortcut menus".


On the View menu, point to Toolbars, and then click Customize.


On the Toolbars tab, click New.


In the Toolbar Name box, type the name you want, and then click OK.


On the Toolbars tab, click Properties.


In the Type list, click Popup.


Set the AllowCustomizing property the way you want, and then click Close.
Microsoft Access adds the shortcut menu to the Shortcut Menus toolbar, from which you customize all shortcut menus.

In the Toolbars box on the Toolbars tab, click Shortcut Menus.


On the Shortcut Menus toolbar (this now appears towards the top of the window), click the Custom category.

Select the custom menu you created.

Move or copy commands from other menus.

If you have questions go into help as instucted above, as it also gives a few explanatory links.

Next you must go into your form's properties and set Shortcut menu to YES, then click to the right of the box under Shortcut Menu Bar and from the dropdown box select the custom menu you created. This is now your shortcut menu for the form.

If you right click on the control you want to search (at least if the control is a text box) this selects the object as the field to search, and ther you go.

I hope I haven't forgotten anything (if I have I'm sure someone will jump in) and that this helps.

The Missinglinq
 
Had a second thought last night (actually it came to me while I was sleeping). You say you want a find feature; do you actually need a find feature (i.e. do you want to be able to enter a partial name and have Access find it) or do you want to enter the actual name? If the latter, the simplest way would be to create the combobox with the wizard, and choose "find a record on my form based on the value I selected in my combobox" at the appropriate time.

Go to "Tools" "Options" "Keyboard" and set the Behavior Entering Field to "Select Entire Field" .

Now when you enter the Projects name field, the entire field will be hilighted. You can simply start typing in the project name and Access will start filling in the matching name(s).

i.e. If you enter "A" the first name starting with a will appear; if you then type "B" Project Able will appear. Next Type "N" and Project Abner will appear, and so forth.

Hope this helps.

The Missinglinq
 

Users who are viewing this thread

Back
Top Bottom