Solved

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

Posted on 2011-03-13
3
408 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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 84
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
unable to save new report from old one 9 27
MS Access - need to reduce row size 25 51
What's wrong with CopyFromRecordset 6 33
SQL multicriteria from ONE textbox 32 41
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now