?
Solved

Setting default column to search in MS Access 2003 with "General Search" enabled?

Posted on 2011-03-13
3
Medium Priority
?
426 Views
Last Modified: 2013-11-27
Hi,
My client wants me to customize the search function in the MS Access 2003
database I set up for him to default to a specific column (the "Look In" field) AND have
a General search option.

First he wanted me to set it to "Any part of Field". That was no problem, just go
to the menu, options --> Edit/Find tab, and set the value to "General search". Ok, so
far, so good....

Problem is , the Search window defaults to the entire table in the "Look In" field, so he has to click
on that drop-down and select the column (which would only be the second choice
if the cursor is focused in the field he wants to search in). But he does this hundreds of times
a day, so...

He wants to have both the General Search (any part of field) and "Look In" default to one column
in the table. Is this possible? Do I have to to edit the Search's event procedure VB (If so, I'm clueless)

Can anyone help me out?

Jim

PS:  the VB for the Search is as follows, if I need to edit something in there to make this happen,
please specify:

Private Sub Find_the_part_Click()
On Error GoTo Err_Find_the_part_Click


    Screen.PreviousControl.SetFocus
    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Find_the_part_Click:
    Exit Sub

Err_Find_the_part_Click:
    MsgBox Err.description
    Resume Exit_Find_the_part_Click
   
End Sub


THANK YOU to anyone who can help!
0
Comment
Question by:jfstanley
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 35123217
That's the nature of the builtin search feature. If you want more functionality you'll have to code that yourself. It can be done, but search functionality can get exceptionally involved.

Many applications have a search form that user can work with to locate records. The form consists of several different controls (textboxes, combos etc) which allow the user to select their criteria, and then a couple of buttons to allow them to actually do the search. Some search facilities show the results in a listbox, others just interact directly with the form (i.e. set the Form filer, or the Form Recordsource, etc etc).

I hate to say it, but if you're "clueless" about VBA and such, then you're probably going to have a difficult time with this.
0
 

Author Comment

by:jfstanley
ID: 35123258
So basically i would need to contract someone to code me a whole new search form to do
what my client wants... there's nothing i can do with that VB that I pasted at the end of my
message to make it happen?...ok, fair enough. Thanks.
0
 
LVL 85
ID: 35124060
That's right. The code you posted just invokes a menuitem (it's no different than clicking a button on the menu).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question